[commit: ghc] wip/nfs-locking: merge GMP library and framework GMP checks together (b784a22)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:51:39 UTC 2017


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

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

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

commit b784a2233bc75245bfddef304fa690dbcf382311
Author: Karel Gardas <karel.gardas at centrum.cz>
Date:   Wed Jan 13 23:03:08 2016 +0100

    merge GMP library and framework GMP checks together


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

b784a2233bc75245bfddef304fa690dbcf382311
 src/Rules/Gmp.hs | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/src/Rules/Gmp.hs b/src/Rules/Gmp.hs
index 94086e1..f34f3f0 100644
--- a/src/Rules/Gmp.hs
+++ b/src/Rules/Gmp.hs
@@ -126,26 +126,23 @@ gmpRules = do
         -- this is indicated by line "HaveFrameworkGMP = YES" in `config.mk`
         configMk <- liftIO . readFile $ gmpBase -/- "config.mk"
         if "HaveFrameworkGMP = YES" `isInfixOf` configMk
+               || "HaveLibGmp = YES" `isInfixOf` configMk
         then do
-            putBuild "| GMP framework detected and will be used"
+            putBuild "| GMP library/framework detected and will be used"
             copyFile gmpLibraryFakeH gmpLibraryH
-        else if "HaveLibGmp = YES" `isInfixOf` configMk
-             then do
-               putBuild "| GMP detected and will be used"
-               copyFile gmpLibraryFakeH gmpLibraryH
-             else do
-               putBuild "| No GMP framework detected; in tree GMP will be built"
-               runMake libPath ["MAKEFLAGS="]
-
-               copyFile (libPath -/- "gmp.h") gmpLibraryInTreeH
-               copyFile (libPath -/- "gmp.h") gmpLibraryH
-               -- TODO: why copy library, can we move it instead?
-               copyFile (libPath -/- ".libs/libgmp.a") gmpLibrary
-
-               createDirectory gmpObjects
-               build $ fullTarget gmpTarget Ar [gmpLibrary] [gmpObjects]
-
-               runBuilder Ranlib [gmpLibrary]
+        else do
+          putBuild "| No GMP library/framework detected; in tree GMP will be built"
+          runMake libPath ["MAKEFLAGS="]
+
+          copyFile (libPath -/- "gmp.h") gmpLibraryInTreeH
+          copyFile (libPath -/- "gmp.h") gmpLibraryH
+           -- TODO: why copy library, can we move it instead?
+          copyFile (libPath -/- ".libs/libgmp.a") gmpLibrary
+
+          createDirectory gmpObjects
+          build $ fullTarget gmpTarget Ar [gmpLibrary] [gmpObjects]
+
+          runBuilder Ranlib [gmpLibrary]
 
         putSuccess "| Successfully built custom library 'integer-gmp'"
 



More information about the ghc-commits mailing list