[commit: ghc] wip/nfs-locking: Don't rerun configure for integerGmp package. (16c89e4)

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


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

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

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

commit 16c89e4739ae570e6e8548ac1fe8092df6353911
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sat Jan 16 03:10:54 2016 +0000

    Don't rerun configure for integerGmp package.
    
    [skip ci]


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

16c89e4739ae570e6e8548ac1fe8092df6353911
 src/Rules/Gmp.hs | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/Rules/Gmp.hs b/src/Rules/Gmp.hs
index 8df337b..61a0a6f 100644
--- a/src/Rules/Gmp.hs
+++ b/src/Rules/Gmp.hs
@@ -75,10 +75,14 @@ gmpRules = do
 
         liftIO $ removeFiles gmpBuildPath ["//*"]
 
-        -- TODO: currently we configure integerGmp package twice -- optimise
-        args <- configureIntGmpArguments
         envs <- configureEnvironment
-        runConfigure (pkgPath integerGmp) envs args
+        -- TODO: without the optimisation below we configure integerGmp package
+        -- twice -- think how this can be optimised (shall we solve #18 first?)
+        -- TODO: this is a hacky optimisation: we do not rerun configure of
+        -- integerGmp package if we detect the results of the previous run
+        unlessM (doesFileExist $ gmpBase -/- "config.mk") $ do
+            args <- configureIntGmpArguments
+            runConfigure (pkgPath integerGmp) envs args
 
         createDirectory $ takeDirectory gmpLibraryH
         -- We don't use system GMP on Windows. TODO: fix?



More information about the ghc-commits mailing list