Reduce verbosity of ghc-cabal and ghc-pkg
authorAndrey Mokhov <andrey.mokhov@gmail.com>
Wed, 5 Oct 2016 16:36:54 +0000 (17:36 +0100)
committerAndrey Mokhov <andrey.mokhov@gmail.com>
Wed, 5 Oct 2016 16:36:54 +0000 (17:36 +0100)
src/Settings/Builders/GhcCabal.hs
src/Settings/Builders/GhcPkg.hs

index 14c1254..fffb2c0 100644 (file)
@@ -17,23 +17,26 @@ import Settings.Builders.Common
 import Settings.Paths
 
 ghcCabalBuilderArgs :: Args
-ghcCabalBuilderArgs = builder GhcCabal ? mconcat
-    [ arg "configure"
-    , arg =<< getPackagePath
-    , arg =<< getContextDirectory
-    , dll0Args
-    , withStaged $ Ghc CompileHs
-    , withStaged GhcPkg
-    , bootPackageDatabaseArgs
-    , libraryArgs
-    , with HsColour
-    , configureArgs
-    , packageConstraints
-    , withStaged $ Cc CompileC
-    , notStage0 ? with Ld
-    , with Ar
-    , with Alex
-    , with Happy ]
+ghcCabalBuilderArgs = builder GhcCabal ? do
+    verbosity <- lift $ getVerbosity
+    mconcat [ arg "configure"
+            , arg =<< getPackagePath
+            , arg =<< getContextDirectory
+            , dll0Args
+            , withStaged $ Ghc CompileHs
+            , withStaged GhcPkg
+            , bootPackageDatabaseArgs
+            , libraryArgs
+            , with HsColour
+            , configureArgs
+            , packageConstraints
+            , withStaged $ Cc CompileC
+            , notStage0 ? with Ld
+            , with Ar
+            , with Alex
+            , with Happy
+            , verbosity < Chatty ? append [ "-v0", "--configure-option=--quiet"
+                , "--configure-option=--disable-option-checking"  ] ]
 
 ghcCabalHsColourBuilderArgs :: Args
 ghcCabalHsColourBuilderArgs = builder GhcCabalHsColour ? do
index ed6843a..b221b9d 100644 (file)
@@ -20,7 +20,9 @@ updateArgs :: Args
 updateArgs = notM initPredicate ? do
     pkg <- getPackage
     dir <- getContextDirectory
+    verbosity <- lift $ getVerbosity
     mconcat [ arg "update"
             , arg "--force"
+            , verbosity < Chatty ? arg "-v0"
             , bootPackageDatabaseArgs
             , arg $ pkgPath pkg -/- dir -/- "inplace-pkg-config" ]