Drop trackBuildSystem setting
[hadrian.git] / src / UserSettings.hs
1 -- If you want to customise your build you should copy this file from
2 -- hadrian/src/UserSettings.hs to hadrian/UserSettings.hs and edit your copy.
3 -- If you don't copy the file your changes will be tracked by git and you can
4 -- accidentally commit them.
5 module UserSettings (
6 buildRootPath, userFlavours, userKnownPackages, integerLibrary, validating,
7 turnWarningsIntoErrors, verboseCommands, putBuild, putSuccess
8 ) where
9
10 import System.Console.ANSI
11
12 import Base
13 import Flavour
14 import GHC
15 import Predicate
16
17 -- TODO: Update the docs.
18 -- See doc/user-settings.md for instructions.
19
20 -- | All build results are put into 'buildRootPath' directory.
21 buildRootPath :: FilePath
22 buildRootPath = "_build"
23
24 -- | User defined build flavours. See 'defaultFlavour' as an example.
25 userFlavours :: [Flavour]
26 userFlavours = []
27
28 -- | Add user defined packages. Note, this only let's Hadrian know about the
29 -- existence of a new package; to actually build it you need to create a new
30 -- build flavour, modifying the list of packages that are built by default.
31 userKnownPackages :: [Package]
32 userKnownPackages = []
33
34 -- | Choose the integer library: 'integerGmp' or 'integerSimple'.
35 integerLibrary :: Package
36 integerLibrary = integerGmp
37
38 -- | User defined flags. Note the following type semantics:
39 -- * @Bool@: a plain Boolean flag whose value is known at compile time.
40 -- * @Action Bool@: a flag whose value can depend on the build environment.
41 -- * @Predicate@: a flag whose value can depend on the build environment and
42 -- on the current build target.
43
44 -- TODO: This should be set automatically when validating.
45 validating :: Bool
46 validating = False
47
48 -- TODO: Replace with stage2 ? arg "-Werror"? Also see #251.
49 -- | To enable -Werror in Stage2 set turnWarningsIntoErrors = stage2.
50 turnWarningsIntoErrors :: Predicate
51 turnWarningsIntoErrors = return False
52
53 -- | Set to True to print full command lines during the build process. Note,
54 -- this is a Predicate, hence you can enable verbose output only for certain
55 -- targets, e.g.: @verboseCommands = package ghcPrim@.
56 verboseCommands :: Predicate
57 verboseCommands = return False
58
59 -- | Customise build progress messages (e.g. executing a build command).
60 putBuild :: String -> Action ()
61 putBuild = putColoured Dull Magenta
62
63 -- | Customise build success messages (e.g. a package is built successfully).
64 putSuccess :: String -> Action ()
65 putSuccess = putColoured Dull Green