X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=libraries%2FMakefile;h=f90cc7179c4cf8bac15b19d5558b3535f4ec8544;hb=854dd40a5c5d2b22be5a314a351772daeffa6dbd;hp=70aea21cbf08445437fe189296614ab3538e66aa;hpb=990faa74e434b1ab5578b36220a336c24cff834b;p=ghc-hetmet.git diff --git a/libraries/Makefile b/libraries/Makefile index 70aea21..f90cc71 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -61,7 +61,6 @@ SUBDIRS += $(wildcard network) SUBDIRS += $(wildcard QuickCheck) SUBDIRS += $(wildcard HUnit) SUBDIRS += $(wildcard mtl) -SUBDIRS += $(wildcard fgl) SUBDIRS += $(wildcard time) SUBDIRS += $(wildcard OpenGL) SUBDIRS += $(wildcard GLUT) @@ -76,6 +75,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) @@ -149,6 +149,18 @@ ifneq "$(HSCOLOUR)" "" CONFIGURE_OPTS += --with-hscolour=$(HSCOLOUR) endif +ifneq "$(ALEX)" "" +CONFIGURE_OPTS += --with-alex=$(ALEX) +endif + +ifneq "$(HADDOCK)" "" +CONFIGURE_OPTS += --with-haddock=$(HADDOCK) +endif + +ifneq "$(HAPPY)" "" +CONFIGURE_OPTS += --with-happy=$(HAPPY) +endif + DEPLOYMENT_OPTS = $(addprefix -optc, $(MACOSX_DEPLOYMENT_CC_OPTS)) \ $(addprefix -optl, $(MACOSX_DEPLOYMENT_LD_OPTS)) @@ -157,32 +169,36 @@ DEPLOYMENT_OPTS = $(addprefix -optc, $(MACOSX_DEPLOYMENT_CC_OPTS)) \ subdirs: @echo $(SUBDIRS) -.PHONY: boot - -boot: ifBuildable/ifBuildable cabal ghc-prim/Setup - HERE_ABS=$(FPTOOLS_TOP_ABS)/libraries IFBUILDABLE=ifBuildable/ifBuildable $(HERE_ABS)/boot-packages -CABAL=$(HERE_ABS)/cabal +CABAL=$(HERE_ABS)/cabal-bin $(GHC) $(HERE_ABS)/bootstrapping.conf CABAL_GHC_FLAGS = -Wall ifeq "$(ghc_ge_605)" "NO" CABAL_GHC_FLAGS += -cpp endif -BOOTSTRAPPING_FLAGS = $(CABAL_GHC_FLAGS) -DCABAL_VERSION=1,3 -odir $(HERE_ABS)/bootstrapping -hidir bootstrapping -i$(HERE_ABS)/Cabal -i$(HERE_ABS)/filepath +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 + +.PHONY: boot + +boot: ifBuildable/ifBuildable cabal-bin bootstrapping.conf -# 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: cabal.hs - $(GHC) $(BOOTSTRAPPING_FLAGS) --make cabal -o cabal -main-is Cabal +cabal-bin: cabal-bin.hs + $(GHC) $(BOOTSTRAPPING_FLAGS) --make cabal-bin -o cabal-bin -# ghc-prim/Setup doesn't really depend on cabal, 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 - cd ghc-prim && $(GHC) $(BOOTSTRAPPING_FLAGS) --make Setup -o Setup +bootstrapping.conf: cabal-bin + echo "[]" > $@.tmp + -cd filepath && $(CABAL) clean --distpref=dist-bootstrapping + cd filepath && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --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) --with-hc-pkg=$(GHC_PKG) --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 @@ -271,7 +287,7 @@ ALL_CONFIGURE_FLAGS = \ $(foreach SUBDIR,$(SUBDIRS), \ stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).$(SUBDIR)): \ -stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: cabal +stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: cabal-bin -$(RM) -f stamp/configure.library.*.$* $*/unbuildable $(MKDIRHIER) `dirname $@` ( cd $* && $(CABAL) configure $(ALL_CONFIGURE_FLAGS) ) \ @@ -290,7 +306,7 @@ stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: cabal # make.*, so filter them out and use an alternate rule below instead. $(foreach SUBDIR,$(filter-out $(SUBDIRS_BUILD),$(SUBDIRS)),make.library.$(SUBDIR)):\ make.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \ - cabal ifBuildable/ifBuildable + cabal-bin ifBuildable/ifBuildable if $(IFBUILDABLE) $*; then \ cd $* && \ cmp -s $(MAKEFILE_LOCAL) Makefile.local || cp $(MAKEFILE_LOCAL) .; \ @@ -310,7 +326,7 @@ make.library.%: build.library.% # Build the library using 'setup build' (not the default) $(foreach SUBDIR,$(SUBDIRS),build.library.$(SUBDIR)):\ build.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \ - cabal ifBuildable/ifBuildable + cabal-bin ifBuildable/ifBuildable if $(IFBUILDABLE) $*; then \ cd $* && \ $(CABAL) build $(addprefix --ghc-option=,$(GhcLibHcOpts)); \ @@ -331,7 +347,7 @@ endif $(foreach SUBDIR,$(SUBDIRS),doc.library.$(SUBDIR)):\ doc.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \ - cabal ifBuildable/ifBuildable + cabal-bin ifBuildable/ifBuildable if $(IFBUILDABLE) $*; then \ cd $* && $(CABAL) haddock --html-location='../$$pkg' \ $(CABAL_HADDOCK_FLAGS); \ @@ -347,8 +363,12 @@ endif distclean: clean clean: $(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR)) + -cd filepath && $(CABAL) clean --distpref=dist-bootstrapping + -cd Cabal && $(CABAL) clean --distpref=dist-bootstrapping $(RM) -rf bootstrapping/* - $(RM) -f cabal + $(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