summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Gardas <karel.gardas@centrum.cz>2016-01-15 17:38:41 +0100
committerBen Gamari <ben@smart-cactus.org>2016-01-15 17:38:43 +0100
commit67fc3f3a290476eb65626897e6f80090dbdc04f8 (patch)
tree0b0c5262da07eb726d685eee101db03d9adb9313
parent756b22832e2ba5713e5bb8201eedf1d04db729a8 (diff)
downloadhaskell-67fc3f3a290476eb65626897e6f80090dbdc04f8.tar.gz
configure.ac: Export MAKECMD to build system
Reviewers: austin, bgamari, thomie Reviewed By: thomie Subscribers: angerman, thomie, erikd Differential Revision: https://phabricator.haskell.org/D1775
-rw-r--r--configure.ac27
1 files changed, 19 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index e9bdeec0fc..771ec43824 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1091,28 +1091,39 @@ if test -e shake-build/cfg/system.config.in; then
AC_CONFIG_FILES([shake-build/cfg/system.config])
fi
-AC_CONFIG_FILES([mk/config.mk mk/install.mk mk/project.mk compiler/ghc.cabal ghc/ghc-bin.cabal utils/runghc/runghc.cabal libraries/ghc-boot/ghc-boot.cabal libraries/ghci/ghci.cabal settings docs/users_guide/ghc_config.py docs/index.html libraries/prologue.txt distrib/configure.ac])
-AC_OUTPUT
-
# We got caught by
# http://savannah.gnu.org/bugs/index.php?1516
# $(eval ...) inside conditionals causes errors
# with make 3.80, so warn the user if it looks like they're about to
# try to use it.
# We would use "grep -q" here, but Solaris's grep doesn't support it.
+print_make_warning=""
checkMake380() {
- if $1 --version 2>&1 | head -1 | grep 'GNU Make 3\.80' > /dev/null
+ make_ver=`$1 --version 2>&1 | head -1`
+ if echo "$make_ver" | grep 'GNU Make 3\.80' > /dev/null
then
- echo
- echo "WARNING: It looks like \"$1\" is GNU make 3.80."
- echo "This version cannot be used to build GHC."
- echo "Please use GNU make >= 3.81."
+ print_make_warning="true"
+ fi
+ if echo "$make_ver" | grep 'GNU Make' > /dev/null
+ then
+ MakeCmd=$1
+ AC_SUBST(MakeCmd)
fi
}
checkMake380 make
checkMake380 gmake
+AC_CONFIG_FILES([mk/config.mk mk/install.mk mk/project.mk compiler/ghc.cabal ghc/ghc-bin.cabal utils/runghc/runghc.cabal libraries/ghc-boot/ghc-boot.cabal libraries/ghci/ghci.cabal settings docs/users_guide/ghc_config.py docs/index.html libraries/prologue.txt distrib/configure.ac])
+AC_OUTPUT
+
+if test "$print_make_warning" = "true"; then
+ echo
+ echo "WARNING: It looks like \"$MakeCmd\" is GNU make 3.80."
+ echo "This version cannot be used to build GHC."
+ echo "Please use GNU make >= 3.81."
+fi
+
echo ["
----------------------------------------------------------------------
Configure completed successfully.