[commit: ghc] master: Build system: prevent "--version: Command not found" (cd0e2f5)

git at git.haskell.org git at git.haskell.org
Sat May 30 15:08:41 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/cd0e2f592c36b92abc7ddc9ebd1f74d03c51862a/ghc

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

commit cd0e2f592c36b92abc7ddc9ebd1f74d03c51862a
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Tue May 26 15:15:38 2015 +0200

    Build system: prevent "--version: Command not found"
    
    This would happen when running `make clean` before running
    `./configure`.
    
    [skip ci]


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

cd0e2f592c36b92abc7ddc9ebd1f74d03c51862a
 libraries/integer-gmp/gmp/ghc.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libraries/integer-gmp/gmp/ghc.mk b/libraries/integer-gmp/gmp/ghc.mk
index 9c7a2a3..2e81956 100644
--- a/libraries/integer-gmp/gmp/ghc.mk
+++ b/libraries/integer-gmp/gmp/ghc.mk
@@ -101,6 +101,8 @@ endif
 
 libraries/integer-gmp_dist-install_EXTRA_CC_OPTS += $(gmp_CC_OPTS)
 
+ifneq "$(CLEANING)" "YES"
+# When running `make clean` before `./configure`, CC_STAGE1 is undefined.
 CLANG = $(findstring clang, $(shell $(CC_STAGE1) --version))
 
 ifeq "$(CLANG)" "clang"
@@ -136,4 +138,5 @@ libraries/integer-gmp/gmp/libgmp.a libraries/integer-gmp/gmp/gmp.h:
 	cd libraries/integer-gmp/gmp/objs && $(AR_STAGE1) x ../libgmp.a
 	$(RANLIB_CMD) libraries/integer-gmp/gmp/libgmp.a
 
-endif
+endif # CLEANING
+endif # phase



More information about the ghc-commits mailing list