Commit b25faf58 authored by Zhen Zhang's avatar Zhen Zhang Committed by Andrey Mokhov

Drop defaultDestDir and use Shake's verbosity to control verbose commands (#400)

parent 8972c19f
......@@ -110,9 +110,12 @@ To build a GHC source distribution tarball, run Hadrian with the `sdist-ghc` tar
To build and install GHC artifacts, run the `install` target.
By default, the artifacts will be installed to `<prefix>` on your system. For example,
`ghc` will be installed to `/usr/local/bin`. By setting flag `--install-destdir=[DESTDIR]`,
By default, the artifacts will be installed to `<prefix>` on your system
(in this case, the `DESTDIR` is empty, corresponds to the root of the file system).
For example on UNIX, `ghc` will be installed to `/usr/local/bin`. By setting flag `--install-destdir=[DESTDIR]`,
you can install things to non-system path `DESTDIR/<prefix>` instead.
Make sure you use correct absolute path on Windows, e.g. `C:/path`,
i.e. GHC is installed into `C:/path/usr/local` for the above example.
#### Testing
......
......@@ -4,7 +4,7 @@
-- accidentally commit them.
module UserSettings (
userBuildRoot, userFlavours, userKnownPackages, verboseCommands,
buildProgressColour, successColour, defaultDestDir, defaultStage1Only
buildProgressColour, successColour, defaultStage1Only
) where
import Hadrian.Utilities
......@@ -33,7 +33,9 @@ userKnownPackages = []
-- this is a 'Predicate', hence you can enable verbose output only for certain
-- targets, e.g.: @verboseCommands = package ghcPrim@.
verboseCommands :: Predicate
verboseCommands = return False
verboseCommands = do
verbosity <- expr getVerbosity
return $ verbosity >= Loud
-- | Set colour for build progress messages (e.g. executing a build command).
buildProgressColour :: BuildProgressColour
......@@ -43,14 +45,6 @@ buildProgressColour = BuildProgressColour (Dull, Magenta)
successColour :: SuccessColour
successColour = SuccessColour (Dull, Green)
-- | Path to the GHC install destination. It is empty by default, which
-- corresponds to the root of the file system. You can replace it by a specific
-- directory. Make sure you use correct absolute path on Windows, e.g. "C:/path".
-- The destination directory is used with a @prefix@, commonly @/usr/local@,
-- i.e. GHC is installed into "C:/path/usr/local" for the above example.
defaultDestDir :: FilePath
defaultDestDir = ""
{-
Stage1Only=YES means:
- don't build ghc-stage2 (the executable)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment