summaryrefslogtreecommitdiff
path: root/distrib/hc-build
diff options
context:
space:
mode:
authorchak <unknown>2000-08-22 08:03:15 +0000
committerchak <unknown>2000-08-22 08:03:15 +0000
commit355076ac5c42dbc9b50ba150f2fdf1a0e76fa8e3 (patch)
treed3e4316fa53c179dba4f7368343837834ee93fad /distrib/hc-build
parentb71148fc3dc7f89c92c144c8e2c30c3eada8a83d (diff)
downloadhaskell-355076ac5c42dbc9b50ba150f2fdf1a0e76fa8e3.tar.gz
[project @ 2000-08-22 08:03:15 by chak]
Works now independent of whether GNU make is installed as gmake or make on the system. [lewie: It was not so good to just change `make' to `gmake'; broke the thing on our Solaris boxen, which have GNU make as the default make.]
Diffstat (limited to 'distrib/hc-build')
-rw-r--r--distrib/hc-build18
1 files changed, 15 insertions, 3 deletions
diff --git a/distrib/hc-build b/distrib/hc-build
index 0b1a03c675..a9074780e4 100644
--- a/distrib/hc-build
+++ b/distrib/hc-build
@@ -9,6 +9,18 @@
configopts="$*"
+# check for GNU make
+#
+MAKENAMES="gmake make no-make"
+for make in $MAKENAMES; do
+ MAKE=$make
+ $make --version 2>&1 | grep "GNU Make" >/dev/null && break
+done
+if [ $MAKE = no-make ]; then
+ echo "Fatal error: Cannot find the GNU make utility"
+ exit 1
+fi
+
# build configuration
#
cat >mk/build.mk <<END
@@ -26,9 +38,9 @@ touch ghc/compiler/parser/Parser.hs
echo "*** Building hsc..."
./configure --enable-hc-boot $configopts || exit 1
-gmake boot all || exit 1
+$MAKE boot all || exit 1
echo "*** Building library..."
echo "GhcWithHscBuiltViaC=NO" >>mk/build.mk
-gmake -C ghc/lib clean boot all || exit 1
-gmake -C hslibs clean boot all
+$MAKE -C ghc/lib clean boot all || exit 1
+$MAKE -C hslibs clean boot all