summaryrefslogtreecommitdiff
path: root/distrib/hc-build
blob: 0b1a03c675160922c811326ea86c24a9cf9fdd0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#/bin/sh

# Manuel M. T. Chakravarty <chak@acm.org>, June 2000
#
# 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="$*"

# build configuration
#
cat >mk/build.mk <<END
ProjectsToBuild = glafp-utils hslibs ghc
GhcLibHcOpts = -O
SRC_HAPPY_OPTS += -c
GhcLibWays=
END

# touch happy generated files; so that in non-bootstrapping mode for
# installation, no attempt is made to call happy
#
touch ghc/compiler/rename/ParseIface.hs
touch ghc/compiler/parser/Parser.hs

echo "*** Building hsc..."
./configure --enable-hc-boot $configopts        || exit 1
gmake 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