X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=libraries%2FMakefile;h=8983a8d500006b5ee2ba0a580f82632c1a456e3e;hb=890616c0347776ac9e5656640369be1948ec729b;hp=aa64155f7bfc39e5785582e21913f8468c65e1de;hpb=e47ddd4edb7e57b5a93a5fdd00ce18809010ee33;p=ghc-hetmet.git diff --git a/libraries/Makefile b/libraries/Makefile index aa64155..8983a8d 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -76,6 +76,7 @@ endif SUBDIRS += $(wildcard parallel) SUBDIRS_BUILD += $(wildcard ndp) SUBDIRS_BUILD += $(wildcard dph/dph-base) +SUBDIRS_BUILD += $(wildcard dph/dph-prim-interface) SUBDIRS_BUILD += $(wildcard dph/dph-prim-seq) SUBDIRS_BUILD += $(wildcard dph/dph-prim-par) SUBDIRS_BUILD += $(wildcard dph/dph) @@ -157,14 +158,10 @@ DEPLOYMENT_OPTS = $(addprefix -optc, $(MACOSX_DEPLOYMENT_CC_OPTS)) \ subdirs: @echo $(SUBDIRS) -.PHONY: boot - -boot: ifBuildable/ifBuildable cabal-bin ghc-prim/Setup - HERE_ABS=$(FPTOOLS_TOP_ABS)/libraries IFBUILDABLE=ifBuildable/ifBuildable $(HERE_ABS)/boot-packages -CABAL=$(HERE_ABS)/cabal-bin +CABAL=$(HERE_ABS)/cabal-bin $(GHC) $(HERE_ABS)/bootstrapping.conf CABAL_GHC_FLAGS = -Wall ifeq "$(ghc_ge_605)" "NO" @@ -173,16 +170,24 @@ endif BOOTSTRAPPING_FLAGS = $(CABAL_GHC_FLAGS) -DCABAL_VERSION=1,3 -odir $(HERE_ABS)/bootstrapping -hidir $(HERE_ABS)/bootstrapping -i$(HERE_ABS)/Cabal -i$(HERE_ABS)/filepath -# We use -main-is so that GHC doesn't get confused and think -# Main.hi/Main.o from cabal belongs to ghc-prim/Setup, or vice-versa. -cabal-bin: cabal-bin.hs - $(GHC) $(BOOTSTRAPPING_FLAGS) --make cabal-bin -o cabal-bin -main-is Cabal +.PHONY: boot + +boot: ifBuildable/ifBuildable cabal-bin bootstrapping.conf -# ghc-prim/Setup doesn't really depend on cabal-bin, but pretending that it -# does sequentialises building the two of them, which is nice given -# they're sharing -odir and -hidir. -ghc-prim/Setup: ghc-prim/Setup.hs cabal-bin - cd ghc-prim && $(GHC) $(BOOTSTRAPPING_FLAGS) --make Setup -o Setup +cabal-bin: cabal-bin.hs + $(GHC) $(BOOTSTRAPPING_FLAGS) --make cabal-bin -o cabal-bin + +bootstrapping.conf: cabal-bin + echo "[]" > $@.tmp + -cd filepath && $(CABAL) clean --distpref=dist-bootstrapping + cd filepath && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --package-db=$(HERE_ABS)/$@.tmp + cd filepath && $(CABAL) build --distpref=dist-bootstrapping + cd filepath && $(CABAL) install --distpref=dist-bootstrapping --inplace + -cd Cabal && $(CABAL) clean --distpref=dist-bootstrapping + cd Cabal && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --package-db=$(HERE_ABS)/$@.tmp + cd Cabal && $(CABAL) build --distpref=dist-bootstrapping + cd Cabal && $(CABAL) install --distpref=dist-bootstrapping --inplace + mv $@.tmp $@ installPackage/installPackage: installPackage.hs -$(RM) -rf installPackage @@ -348,7 +353,9 @@ distclean: clean clean: $(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR)) $(RM) -rf bootstrapping/* - $(RM) -f cabal-bin + $(RM) -f bootstrapping.conf bootstrapping.conf.old + $(RM) -f bootstrapping.conf.tmp bootstrapping.conf.tmp.old + $(RM) -f cabal-bin cabal-bin.exe $(RM) -rf ifBuildable $(RM) -rf installPackage $(RM) -f libraries.txt index.html doc-index.html doc-index*.html @@ -361,6 +368,7 @@ $(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR)): \ clean.library.%: $(RM) -f stamp/configure.library.*.$* $*/unbuildable -cd $* && $(CABAL) clean + -cd $* && $(CABAL) clean --distpref=dist-bootstrapping $(RM) -f $*/Setup $*/Setup.exe $*/Setup.hi $*/Setup.o $(RM) $*/GNUmakefile $*/Makefile.local endif