# unpacked). All options are passed through to ./configure (especially
# useful with --prefix).
-configopts="$*"
+configopts="$*" # e.g., --enable-hc-boot-unregisterised
# check for GNU make
#
echo "*** Building hsc..."
./configure --enable-hc-boot $configopts
$MAKE -C glafp-utils boot all
-$MAKE -C ghc/utils/unlit boot all
$MAKE -C ghc boot
$MAKE -C hslibs boot all
$MAKE -C ghc all
echo "*** Building libraries..."
-./configure
+GHC="$PWD/ghc/compiler/ghc-inplace" HappyCmd="$PWD/distrib/fake-happy" ./configure
-# clean in ghc/lib, but avoid removing hsc2hs-generated .hs files
-$MAKE -C ghc/lib clean HSC_SRCS=""
-$MAKE -C ghc/lib boot all
+# make ghc/utils while we still have libraries in ghc/lib
+$MAKE -C ghc/utils clean boot
+$MAKE -C ghc/utils all
-$MAKE -C hslibs clean boot all
-$MAKE -C ghc/utils clean boot all
+# now, clean and build the libraries
+$MAKE -C ghc/lib clean boot
+$MAKE -C ghc/lib all
+$MAKE -C hslibs clean boot
+$MAKE -C hslibs all