Change the command-line semantics for query commands
[ghc-hetmet.git] / gmp / Makefile
index 82de987..13faf9f 100644 (file)
@@ -14,6 +14,11 @@ ifneq "$(HaveFrameworkGMP)" "YES"
 
 PLATFORM := $(shell echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g')
 
+# 2007-09-26
+#     set -o igncr 
+# is not a valid command on non-Cygwin-systems.
+# Let it fail silently instead of aborting the build.
+#
 # 2007-07-05
 # We do
 #     set -o igncr; export SHELLOPTS
@@ -58,7 +63,7 @@ stamp.gmp.static:
        $(TAR) -zxf $(GMP_TARBALL)
        mv $(GMP_DIR) gmpbuild
        chmod +x ln
-       set -o igncr; export SHELLOPTS; \
+       (set -o igncr 2>/dev/null) && set -o igncr; export SHELLOPTS; \
            export PATH=`pwd`:$$PATH; \
            cd gmpbuild && \
            CC=$(WhatGccIsCalled) $(SHELL) configure \
@@ -70,7 +75,7 @@ stamp.gmp.shared:
        $(TAR) -zxf $(GMP_TARBALL)
        mv $(GMP_DIR) gmpbuild-shared
        chmod +x ln
-       set -o igncr; export SHELLOPTS; \
+       (set -o igncr 2>/dev/null) && set -o igncr; export SHELLOPTS; \
            export PATH=`pwd`:$$PATH; \
            cd gmpbuild-shared && \
            CC=$(WhatGccIsCalled) $(SHELL) configure \
@@ -94,10 +99,15 @@ libgmp.dll.a: libgmp-3.dll
 endif
 endif
 
+# GMP takes a long time to build, but changes rarely.  Hence we don't
+# bother cleaning it before validating, because that adds a
+# significant overhead to validation.
+ifeq "$(Validating)" "NO"
 clean distclean maintainer-clean ::
        $(RM) -f stamp.gmp.static stamp.gmp.shared
        $(RM) -rf gmpbuild
        $(RM) -rf gmpbuild-shared
+endif
 
 #-----------------------------------------------------------------------------
 #