3 # Manuel M. T. Chakravarty <chak@acm.org>, June 2000
4 # Updated for GHC 5.00, Simon Marlow, March 2001
6 # Script to build GHC from .hc files (must be run in the fptools/ root
7 # directory into which the source and .hc files must already have been
8 # unpacked). All options are passed through to ./configure (especially
9 # useful with --prefix).
15 MAKENAMES="gmake make no-make"
16 for make in $MAKENAMES; do
18 $make --version 2>&1 | grep "GNU Make" >/dev/null && break
20 if [ $MAKE = no-make ]; then
21 echo "Fatal error: Cannot find the GNU make utility"
27 cat >mk/build.mk <<END
31 # touch happy generated files; so that in non-bootstrapping mode for
32 # installation, no attempt is made to call happy
34 touch ghc/compiler/rename/ParseIface.hs
35 touch ghc/compiler/parser/Parser.hs
36 touch ghc/compiler/main/ParsePkgConf.hs
38 echo "*** Building hsc..."
39 ./configure --enable-hc-boot $configopts
41 $MAKE -C hslibs boot all
44 echo "*** Building libraries..."
47 # clean in ghc/lib, but avoid removing hsc2hs-generated .hs files
48 $MAKE -C ghc/lib clean HSC_SRCS=""
49 $MAKE -C ghc/lib boot all
51 $MAKE -C hslibs clean boot all
52 $MAKE -C ghc/utils clean boot all