[project @ 2000-06-18 12:13:56 by chak]
[ghc-hetmet.git] / distrib / hc-build
1 #/bin/sh
2
3 # Manuel M. T. Chakravarty <chak@acm.org>, June 2000
4 #
5 # Script to build GHC from .hc files (must be run in the fptools/ root
6 # directory into which the source and .hc files must already have been
7 # unpacked).  All options are passed through to ./configure (especially
8 # useful with --prefix).
9
10 configopts="$*"
11
12 # build configuration
13 #
14 cat >mk/build.mk <<END
15 ProjectsToBuild = glafp-utils hslibs ghc
16 GhcLibHcOpts = -O
17 SRC_HAPPY_OPTS += -c
18 GhcLibWays=
19 END
20
21 # touch happy generated files; so that in non-bootstrapping mode for
22 # installation, no attempt is made to call happy
23 #
24 touch ghc/compiler/rename/ParseIface.hs
25 touch ghc/compiler/parser/Parser.hs
26
27 echo "*** Building hsc..."
28 ./configure --enable-hc-boot $configopts        || exit 1
29 make boot all                                   || exit 1
30
31 echo "*** Building library..."
32 echo "GhcWithHscBuiltViaC=NO" >>mk/build.mk
33 make -C ghc/lib clean boot all                  || exit 1
34 make -C hslibs  clean boot all