X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=libraries%2FMakefile;h=7d4c06777bf15327ab44b09c8e7f8b9470ded13c;hb=364193a015565b043c5d0417750b023af6760c4f;hp=2dadbae0627e5125f6a629ab51c2936479f3f601;hpb=720bfb294c6380b7aa954d94f9ff909031cebf6f;p=ghc-hetmet.git diff --git a/libraries/Makefile b/libraries/Makefile index 2dadbae..7d4c067 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -9,6 +9,10 @@ # # make clean.library. # make build.library. +# +# or the following is equivalent: +# +# make rebuild.library. .PHONY: default_target @@ -23,7 +27,8 @@ TOP=. include $(TOP)/mk/boilerplate.mk endif -SUBDIRS = base filepath haskell98 template-haskell readline Cabal +SUBDIRS = base old-locale old-time directory filepath pretty \ + template-haskell readline Cabal random haskell98 ifeq "$(GhcLibsWithUnix)" "YES" SUBDIRS += unix @@ -64,6 +69,7 @@ SUBDIRS += $(wildcard arrows) ifeq "$(GhcLibsWithObjectIO)" "YES" SUBDIRS += $(wildcard ObjectIO) endif +SUBDIRS += $(wildcard parallel) endif # ----------------------------------------------------------------------------- @@ -90,7 +96,10 @@ CONFIGURE_OPTS += --enable-split-objs CONFIGURE_STAMP_EXTRAS := $(CONFIGURE_STAMP_EXTRAS)-splitting endif -BOOTSTRAPPING_STAMPS = $(addprefix stamp/bootstrapping.,Cabal filepath) +BOOTSTRAP_LIBS = Cabal filepath +BOOTSTRAP_STAMPS = $(addprefix stamp/bootstrapping.,$(BOOTSTRAP_LIBS)) +BOOTSTRAP_INC_1_UP = $(addprefix -i../bootstrapping.,$(BOOTSTRAP_LIBS)) +BOOTSTRAP_INC_2_UP = $(addprefix -i../../bootstrapping.,$(BOOTSTRAP_LIBS)) .PHONY: subdirs @@ -99,7 +108,7 @@ subdirs: .PHONY: boot -boot: $(BOOTSTRAPPING_STAMPS) ifBuildable/ifBuildable \ +boot: $(BOOTSTRAP_STAMPS) ifBuildable/ifBuildable \ $(foreach SUBDIR,$(SUBDIRS),$(SUBDIR)/setup/Setup) \ installPackage/installPackage @@ -110,22 +119,20 @@ boot: $(BOOTSTRAPPING_STAMPS) ifBuildable/ifBuildable \ # We ought to be depending on %/Setup.*hs, but make makes that difficult. $(foreach SUBDIR,$(SUBDIRS),$(SUBDIR)/setup/Setup): \ -%/setup/Setup: $(BOOTSTRAPPING_STAMPS) +%/setup/Setup: $(BOOTSTRAP_STAMPS) -$(RM) -rf $*/setup mkdir $*/setup $(CP) $*/Setup.*hs $*/setup - cd $*/setup && $(GHC) -i../../bootstrapping.Cabal \ - -i../../bootstrapping.filepath \ - -Wall -cpp --make Setup.*hs -o Setup + cd $*/setup && $(GHC) -Wall -cpp --make Setup.*hs -o Setup \ + $(BOOTSTRAP_INC_2_UP) -installPackage/installPackage: installPackage.hs $(BOOTSTRAPPING_STAMPS) +installPackage/installPackage: installPackage.hs $(BOOTSTRAP_STAMPS) -$(RM) -rf installPackage mkdir installPackage $(CP) installPackage.hs installPackage/ cd installPackage && $(GHC) -Wall -cpp \ --make installPackage -o installPackage \ - -i../bootstrapping.Cabal \ - -i../bootstrapping.filepath + $(BOOTSTRAP_INC_1_UP) ifBuildable/ifBuildable: ifBuildable.hs -$(RM) -rf ifBuildable @@ -133,7 +140,7 @@ ifBuildable/ifBuildable: ifBuildable.hs $(CP) ifBuildable.hs ifBuildable/ cd ifBuildable && $(GHC) -Wall --make ifBuildable -o ifBuildable -$(BOOTSTRAPPING_STAMPS): stamp/bootstrapping.%: +$(BOOTSTRAP_STAMPS): stamp/bootstrapping.%: $(RM) -rf bootstrapping.$* $(CP) -R $* bootstrapping.$* $(FIND) bootstrapping.$* \( -name "*.o" -o -name "*.hi" \) \ @@ -148,6 +155,11 @@ ifneq "$(NO_HADDOCK_DOCS)" "YES" all: doc endif +.PHONY: rebuild.library.% + +$(foreach SUBDIR,$(SUBDIRS),rebuild.library.$(SUBDIR)):\ +rebuild.library.%: clean.library.% build.library.% + build: $(foreach SUBDIR,$(SUBDIRS),build.library.$(SUBDIR)) build: installPackage/installPackage