[commit: ghc] wip/nfs-locking: Handle Make correctly in needBuilder, refactor customBuild (7f62b5a)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:29:06 UTC 2017


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

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

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

commit 7f62b5a774b790a750651a834cc0de6ffaf61943
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Fri Dec 16 21:07:13 2016 +0000

    Handle Make correctly in needBuilder, refactor customBuild
    
    See #295


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

7f62b5a774b790a750651a834cc0de6ffaf61943
 src/Util.hs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/Util.hs b/src/Util.hs
index 81f67dd..b6d9536 100644
--- a/src/Util.hs
+++ b/src/Util.hs
@@ -61,7 +61,6 @@ customBuild rs opts target at Target {..} = do
                     cmd [Cwd output] [path] "x" (top -/- input)
 
             Configure dir -> do
-                need [dir -/- "configure"]
                 -- Inject /bin/bash into `libtool`, instead of /bin/sh
                 let env = AddEnv "CONFIG_SHELL" "/bin/bash"
                 cmd Shell cmdEcho env [Cwd dir] [path] opts argList
@@ -76,9 +75,7 @@ customBuild rs opts target at Target {..} = do
                 Stdout output <- cmd (Stdin input) [path] argList
                 writeFileChanged file output
 
-            Make dir -> do
-                need [dir -/- "Makefile"]
-                cmd Shell cmdEcho path ["-C", dir] argList
+            Make dir -> cmd Shell cmdEcho path ["-C", dir] argList
 
             _  -> cmd [path] argList
 
@@ -170,6 +167,7 @@ isInternal = isJust . builderProvenance
 -- | Make sure a 'Builder' exists and rebuild it if out of date.
 needBuilder :: Builder -> Action ()
 needBuilder (Configure dir) = need [dir -/- "configure"]
+needBuilder (Make      dir) = need [dir -/- "Makefile"]
 needBuilder builder         = when (isInternal builder) $ do
     path <- builderPath builder
     need [path]



More information about the ghc-commits mailing list