summaryrefslogtreecommitdiff
path: root/ghc/Makefile
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-08-05 13:38:23 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-08-05 13:38:23 +0000
commitc8577590bd59c65effd1f178d1b97a6a0db32851 (patch)
tree837e9ea49da8f306a7c9e41888df620e9fe77036 /ghc/Makefile
parent1935abf4ff26791439074669727c12923c216e35 (diff)
downloadhaskell-c8577590bd59c65effd1f178d1b97a6a0db32851.tar.gz
in stage1, always rebuild Main.hs
GHC 6.9+ can properly handle cross-package recompilation checking, but older versions of GHC couldn't, so in stage1 we always rebuild Main.hs. In other words, 'make' in ghc/ should do the right thing now.
Diffstat (limited to 'ghc/Makefile')
-rw-r--r--ghc/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/ghc/Makefile b/ghc/Makefile
index 282ffe7066..894f2dfb3b 100644
--- a/ghc/Makefile
+++ b/ghc/Makefile
@@ -82,6 +82,12 @@ BUILD_FLAGS=$(patsubst %, --ghc-option=%, $(EXTRA_HC_OPTS))
# It works because installPackage doesn't actually use ghc-pkg, as there's
# no library to register
+ifeq "$(stage)" "1"
+# GHC 6.9+ can handle cross-package recompilation checking, but
+# we don't rely on the bootstrapping compiler being able to do this.
+TOUCH_MAIN = $(RM) dist-stage1/build/ghc/ghc-tmp/Main.o
+endif
+
boot.stage.%:
$(CABAL) configure --distpref dist-stage$* \
$(INSTALL_DIRS_CONFIGURE_FLAGS) \
@@ -92,6 +98,7 @@ boot.stage.%:
--datasubdir=.
build.stage.%:
+ $(TOUCH_MAIN)
$(CABAL) build --distpref dist-stage$* $(BUILD_FLAGS)
$(INSTALL_PACKAGE) install '$(GHC_PKG_PROG)' 'XXX/package.conf' "" \
$(FPTOOLS_TOP_ABS)/ghc/stage$*-inplace \