[commit: ghc] wip/nfs-locking: Allow more parallelism in buildPackageData. (61a085c)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:01:52 UTC 2017


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

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

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

commit 61a085c0310dbd583855319be36faf017fe2aaf5
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Aug 2 03:39:17 2015 +0100

    Allow more parallelism in buildPackageData.


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

61a085c0310dbd583855319be36faf017fe2aaf5
 src/Rules/Data.hs | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/Rules/Data.hs b/src/Rules/Data.hs
index 752cde7..adc31f1 100644
--- a/src/Rules/Data.hs
+++ b/src/Rules/Data.hs
@@ -35,15 +35,17 @@ buildPackageData (Resources ghcCabal ghcPkg) target = do
         -- TODO: Is this needed? Also check out Paths_cpsa.hs.
         -- , "build" -/- "autogen" -/- ("Paths_" ++ name) <.> "hs"
         ] &%> \files -> do
-            -- GhcCabal may run the configure script, so we depend on it
-            -- We don't know who built the configure script from configure.ac
-            whenM (doesFileExist $ configure <.> "ac") $ need [configure]
-
             -- We configure packages in the order of their dependencies
             deps <- packageDeps . dropExtension . pkgCabal $ pkg
             pkgs <- interpret target packages
             let depPkgs = concatMap (maybeToList . findPackage pkgs) deps
-            need $ map (\p -> targetPath stage p -/- "package-data.mk") depPkgs
+
+            -- GhcCabal may run the configure script, so we depend on it
+            -- We don't know who built the configure script from configure.ac
+            needConfigure <- doesFileExist $ configure <.> "ac"
+
+            need $ [ configure | needConfigure ] ++
+                   [ targetPath stage p -/- "package-data.mk" | p <- depPkgs ]
 
             buildWithResources [(ghcCabal, 1)] $
                 fullTarget target [cabal] GhcCabal files



More information about the ghc-commits mailing list