[commit: ghc] wip/nfs-locking: Don't track integer-gmp.buildinfo. (d684612)

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


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

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

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

commit d6846121743a4b61cb2cef6d57afa322b3fb6076
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Fri Jan 15 16:07:28 2016 +0000

    Don't track integer-gmp.buildinfo.
    
    See #173.


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

d6846121743a4b61cb2cef6d57afa322b3fb6076
 src/Rules/Gmp.hs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Rules/Gmp.hs b/src/Rules/Gmp.hs
index cfd8c53..d8cf707 100644
--- a/src/Rules/Gmp.hs
+++ b/src/Rules/Gmp.hs
@@ -82,18 +82,19 @@ gmpRules = do
 
         createDirectory $ takeDirectory gmpLibraryH
         -- We don't use system GMP on Windows. TODO: fix?
+        -- TODO: we do not track "config.mk" and "integer-gmp.buildinfo", see #173
         windows <- windowsHost
         configMk <- liftIO . readFile $ gmpBase -/- "config.mk"
         if not windows && any (`isInfixOf` configMk) [ "HaveFrameworkGMP = YES", "HaveLibGmp = YES" ]
         then do
             putBuild "| GMP library/framework detected and will be used"
             copyFile gmpLibraryFakeH gmpLibraryH
-            buildInfo <- readFileLines $ pkgPath integerGmp -/- "integer-gmp.buildinfo"
+            buildInfo <- liftIO . readFile $ pkgPath integerGmp -/- "integer-gmp.buildinfo"
             let prefix = "extra-libraries: "
                 libs s = case stripPrefix prefix s of
                     Nothing    -> []
                     Just value -> words value
-            writeFileChanged gmpLibNameCache . unlines $ concatMap libs buildInfo
+            writeFileChanged gmpLibNameCache . unlines . concatMap libs $ lines buildInfo
         else do
             putBuild "| No GMP library/framework detected; in tree GMP will be built"
             writeFileChanged gmpLibNameCache ""



More information about the ghc-commits mailing list