In "boot" we configure, and in "all" we do the actual building.
primop-strictness.hs-incl \
primop-primop-info.hs-incl
primop-strictness.hs-incl \
primop-primop-info.hs-incl
+boot:: boot.stage.$(stage)
+
all:: build.stage.$(stage)
stage1 ::
all:: build.stage.$(stage)
stage1 ::
CONFIGURE_FLAGS_STAGE2 += $(USE_STAGE1_CONFIGURE_FLAGS)
CONFIGURE_FLAGS_STAGE3 += $(USE_STAGE2_CONFIGURE_FLAGS)
CONFIGURE_FLAGS_STAGE2 += $(USE_STAGE1_CONFIGURE_FLAGS)
CONFIGURE_FLAGS_STAGE3 += $(USE_STAGE2_CONFIGURE_FLAGS)
-build.stage.%: $(PRIMOP_BITS)
$(CABAL) configure --distpref dist-stage$* \
$(CONFIGURE_FLAGS_STAGE$*) \
$(INSTALL_DIRS_CONFIGURE_FLAGS) \
$(CABAL) configure --distpref dist-stage$* \
$(CONFIGURE_FLAGS_STAGE$*) \
$(INSTALL_DIRS_CONFIGURE_FLAGS) \
--ghc-option=-DSTAGE=$*
$(RM) -f Makefile-stage$*
$(CABAL) makefile --distpref dist-stage$* -f Makefile-stage$*
--ghc-option=-DSTAGE=$*
$(RM) -f Makefile-stage$*
$(CABAL) makefile --distpref dist-stage$* -f Makefile-stage$*
+
+build.stage.%: $(PRIMOP_BITS)
$(MAKE) -f Makefile-stage$* stage=$*
$(CABAL) register --distpref dist-stage$* --inplace
$(MAKE) -f Makefile-stage$* stage=$*
$(CABAL) register --distpref dist-stage$* --inplace
INSTALL_FLAGS = --enable-shell-wrappers
endif
INSTALL_FLAGS = --enable-shell-wrappers
endif
+boot:: boot.stage.$(stage)
all:: build.stage.$(stage)
all:: build.stage.$(stage)
# It works because installPackage doesn't actually use ghc-pkg, as there's
# no library to register
# It works because installPackage doesn't actually use ghc-pkg, as there's
# no library to register
$(CABAL) configure --distpref dist-stage$* \
$(SET_DATA_SUBDIR) \
$(INSTALL_DIRS_CONFIGURE_FLAGS) \
$(CONFIGURE_FLAGS_STAGE$*) \
$(COMMON_CONFIGURE_FLAGS)
$(CABAL) configure --distpref dist-stage$* \
$(SET_DATA_SUBDIR) \
$(INSTALL_DIRS_CONFIGURE_FLAGS) \
$(CONFIGURE_FLAGS_STAGE$*) \
$(COMMON_CONFIGURE_FLAGS)
$(CABAL) build --distpref dist-stage$* $(BUILD_FLAGS)
$(INSTALL_PACKAGE) install '$(GHC_PKG_PROG)' 'XXX/package.conf' "" \
$(FPTOOLS_TOP_ABS)/ghc/stage$*-inplace \
$(CABAL) build --distpref dist-stage$* $(BUILD_FLAGS)
$(INSTALL_PACKAGE) install '$(GHC_PKG_PROG)' 'XXX/package.conf' "" \
$(FPTOOLS_TOP_ABS)/ghc/stage$*-inplace \