X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=distrib%2Fhc-build;h=1e3decda3129450034a621172d3cbf18424fb2cf;hp=0b1a03c675160922c811326ea86c24a9cf9fdd0f;hb=a3e027a34f5e956da3875ab629aa2427e520f879;hpb=393185426d61a45e0d7f1cb97925b7f7ae0ed278 diff --git a/distrib/hc-build b/distrib/hc-build index 0b1a03c..1e3decd 100644 --- a/distrib/hc-build +++ b/distrib/hc-build @@ -1,34 +1,110 @@ -#/bin/sh +#!/bin/sh -e # Manuel M. T. Chakravarty , June 2000 +# Updated for GHC 5.00, Simon Marlow, March 2001 +# Updated for GHC 5.04.3, Urban Boquist, March 2003 # # Script to build GHC from .hc files (must be run in the fptools/ root # directory into which the source and .hc files must already have been # unpacked). All options are passed through to ./configure (especially # useful with --prefix). -configopts="$*" +configopts="$*" # e.g., --enable-hc-boot-unregisterised +PWD=`pwd` + +# 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 <>mk/build.mk <>mk/build.mk <>mk/build.mk -gmake -C ghc/lib clean boot all || exit 1 -gmake -C hslibs clean boot all +# At this point, the tree should be safe to do 'make install' in.