[commit: ghc] wip/nfs-locking: Drop defaultDestDir and use Shake's verbosity to control verbose commands (#400) (b25faf5)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:40:36 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/b25faf58f70159b741d6e13da7da329388914d65/ghc

>---------------------------------------------------------------

commit b25faf58f70159b741d6e13da7da329388914d65
Author: Zhen Zhang <izgzhen at gmail.com>
Date:   Thu Aug 24 02:44:47 2017 +0800

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


>---------------------------------------------------------------

b25faf58f70159b741d6e13da7da329388914d65
 README.md           |  7 +++++--
 src/UserSettings.hs | 14 ++++----------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md
index ecf9728..ad61ef3 100644
--- a/README.md
+++ b/README.md
@@ -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
 
diff --git a/src/UserSettings.hs b/src/UserSettings.hs
index d77d998..4a1db5b 100644
--- a/src/UserSettings.hs
+++ b/src/UserSettings.hs
@@ -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 at .
 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)



More information about the ghc-commits mailing list