diff options
author | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2008-02-18 06:18:09 +0000 |
---|---|---|
committer | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2008-02-18 06:18:09 +0000 |
commit | 3e2748164e3e2e2dc21ca511959671f0f5f2e37f (patch) | |
tree | 83bad04ee4581aa0ba12b7ef3d3a074f5334550b /utils/hsc2hs | |
parent | 82dc0d197b39b6462d1a19e4c556f7acdf376ee9 (diff) | |
download | haskell-3e2748164e3e2e2dc21ca511959671f0f5f2e37f.tar.gz |
All installed Haskell prgms have an inplace and an installed version
- GHC installs a range of compiled Haskell programs in addition to the actual
compiler. To ensure that they all run on the platform targeted by the build
(which may have different libraries installed than the build host), we need
to make sure that all compiled Haskell code going into an install is build
with the stage 1 compiler, not the bootstrap compiler. Getting this right
is especially important on the Mac to enable builds that work on Mac OS X
versions that are older than the one performing the build.
- For all installed utils implemented in Haskell (i.e., ghc-pkg, hasktags,
hsc2hs, runghc, hpc, and pwd) we compile two versions, an inplace version
and a version for installation. The former is build by the bootstrap
compiler during the stage 1 build and the latter is build by the stage 1
compiler during the stage 2 build.
- This is really very much as the setup for ghc itself, only that we don't use
separate stage1/ and stage2/ build directories. Instead, we clean before
each build. CAVEAT: This only works properly if invoked from the
toplevel Makefile.
- Instead of UseStage1=YES (as used by the previous binary-dist-specific
recompilation), we now use the same $(stage) variables as used for the
compiler proper - to increase uniformity and to avoid extra conditionals for
the install target.
Diffstat (limited to 'utils/hsc2hs')
-rw-r--r-- | utils/hsc2hs/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/hsc2hs/Makefile b/utils/hsc2hs/Makefile index de8d64f06b..ca3fcd0220 100644 --- a/utils/hsc2hs/Makefile +++ b/utils/hsc2hs/Makefile @@ -13,7 +13,14 @@ include $(GHC_COMPAT_DIR)/compat.mk # we must also build with $(GhcHcOpts) here: SRC_HC_OPTS += $(GhcHcOpts) $(GhcStage1HcOpts) -HS_PROG = hsc2hs-bin +# We have two version: the inplace version compiled by the bootstrap compiler +# and the install version compiled by the stage 1 compiler +ifeq "$(stage)" "2" +HS_PROG = hsc2hs.bin +else +HS_PROG = hsc2hs-inplace.bin +endif + ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" HS_PROG = hsc2hs$(exeext) endif |