When making in compiler/, automatically make in ghc/ when we are done
authorIan Lynagh <igloo@earth.li>
Sun, 17 Aug 2008 11:42:02 +0000 (11:42 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 17 Aug 2008 11:42:02 +0000 (11:42 +0000)
Makefile
compiler/Makefile
ghc/Makefile

index 157fd31..d2cd6b8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -131,8 +131,6 @@ stage1 : $(GCC_LIB_DEP) check-all
          $(MAKE) --no-print-directory -C $$i $(MFLAGS) all; \
          if [ $$? -eq 0 -o $$x_on_err -eq 0 ] ;  then true; else exit 1; fi; \
        done
-       $(MAKE) -C ghc stage=1 boot
-       $(MAKE) -C ghc stage=1
        $(MAKE) -C rts boot
        $(MAKE) -C rts
        $(MAKE) -C libraries all
@@ -151,14 +149,10 @@ stage2 : check-all
 ifeq "$(HADDOCK_DOCS)" "YES"
        $(MAKE) -C compiler stage=2 doc
 endif
-       $(MAKE) -C ghc      stage=2 boot
-       $(MAKE) -C ghc      stage=2
 
 stage3 : check-all
        $(MAKE) -C compiler stage=3 boot
        $(MAKE) -C compiler stage=3
-       $(MAKE) -C ghc      stage=3 boot
-       $(MAKE) -C ghc      stage=3
 
 bootstrap  : bootstrap2
 
index ca3f96e..51ba8b9 100644 (file)
@@ -186,6 +186,7 @@ boot.stage.%: $(PRIMOP_BITS) $(CONFIG_HS) parser/Parser.y
 build.stage.%:
        $(MAKE) -f Makefile-stage$* stage=$*
        $(CABAL) register  --distpref dist-stage$* --inplace
+       $(MAKE) -C ../ghc stage=$*
 
 doc.stage.%:
        $(CABAL) haddock --distpref dist-stage$*
index 5eff4da..9d5ded7 100644 (file)
@@ -89,6 +89,8 @@ TOUCH_MAIN = $(RM) dist-stage1/build/ghc/ghc-tmp/Main.o
 endif
 endif
 
+dist-stage%: boot.stage.%
+
 boot.stage.%:
        $(CABAL) configure --distpref dist-stage$*         \
                           $(INSTALL_DIRS_CONFIGURE_FLAGS) \
@@ -98,7 +100,7 @@ boot.stage.%:
                           --datadir='$$libdir'            \
                           --datasubdir=.
 
-build.stage.%:
+build.stage.%: dist-stage%
        $(TOUCH_MAIN)
        $(CABAL) build     --distpref dist-stage$* $(BUILD_FLAGS)
        $(INSTALL_PACKAGE) install '$(GHC_PKG_PROG)' 'XXX/package.conf' "" \