[commit: ghc] wip/nfs-locking: Drop alwaysRerun from setup rules. (b3e25ee)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:48:42 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/b3e25ee579ad44a35b4cbf243b05728c4f63c5d1/ghc
>---------------------------------------------------------------
commit b3e25ee579ad44a35b4cbf243b05728c4f63c5d1
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Wed Feb 10 12:42:54 2016 +0000
Drop alwaysRerun from setup rules.
>---------------------------------------------------------------
b3e25ee579ad44a35b4cbf243b05728c4f63c5d1
src/Rules/Setup.hs | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/Rules/Setup.hs b/src/Rules/Setup.hs
index c99c8be..a17fb59 100644
--- a/src/Rules/Setup.hs
+++ b/src/Rules/Setup.hs
@@ -9,13 +9,10 @@ import Rules.Generators.GhcAutoconfH
setupRules :: Rules ()
setupRules = do
- -- We always rerun the configure script in this mode, because the flags
- -- passed to it can affect the contents of system.config file.
[configFile, "settings", configH] &%> \[cfg, settings, cfgH] -> do
- alwaysRerun
+ need [ settings <.> "in", cfgH <.> "in", "configure" ]
case cmdSetup of
RunSetup configureArgs -> do
- need [ settings <.> "in", cfgH <.> "in" ]
-- We cannot use windowsHost here due to a cyclic dependency
when (System.Info.os == "mingw32") $ do
putBuild "| Checking for Windows tarballs..."
@@ -24,11 +21,23 @@ setupRules = do
, "download"
, System.Info.arch ]
runConfigure "." [] [configureArgs]
- SkipSetup -> unlessM (doesFileExist cfg) $
- putError $ "Configuration file " ++ cfg ++ " is missing.\n"
- ++ "Run the configure script either manually or via the "
+ SkipSetup -> do
+ cfgExists <- doesFileExist cfg
+ if cfgExists
+ then putError $ "Configuration file " ++ cfg ++ " is out-of-date."
+ ++ "\nRerun the configure script either manually or via the "
+ ++ "build system by passing --setup[=CONFIGURE_ARGS] flag."
+ else putError $ "Configuration file " ++ cfg ++ " is missing."
+ ++ "\nRun the configure script either manually or via the "
++ "build system by passing --setup[=CONFIGURE_ARGS] flag."
["configure", configH <.> "in"] &%> \_ -> do
- putBuild "| Running boot..."
- quietly $ cmd (EchoStdout False) "perl boot"
+ need ["configure.ac"]
+ case cmdSetup of
+ RunSetup _ -> do
+ putBuild "| Running boot..."
+ quietly $ cmd (EchoStdout False) "perl boot"
+ SkipSetup -> do
+ putError $ "The configure script is out-of-date."
+ ++ "\nRun the boot script either manually or via the "
+ ++ "build system by passing --setup[=CONFIGURE_ARGS] flag."
More information about the ghc-commits
mailing list