X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc.mk;h=fa286089f1f4cbdf74b66c4347befd558e1286c0;hb=6686da2c412d2d7ca6e4b6dc2a7b3ee7bf1752c0;hp=8c33e0e8f537bbb92f83120bef264d41726f94d7;hpb=fdc0cd3d4ab693867f79d9c741c9387d66782c01;p=ghc-hetmet.git diff --git a/ghc.mk b/ghc.mk index 8c33e0e..fa28608 100644 --- a/ghc.mk +++ b/ghc.mk @@ -33,20 +33,15 @@ # * remove old Makefiles, add new stubs for building in subdirs # * utils/hsc2hs/Makefile # * utils/haddock/Makefile -# * mk/oldconfig.mk.in # * docs/Makefile # * docs/docbook-cheat-sheet/Makefile # * docs/ext-core/Makefile # * docs/man/Makefile # * docs/storage-mgmt/Makefile -# * docs/users_guide/Makefile # * docs/vh/Makefile # * driver/Makefile -# * driver/ghc/Makefile -# * libraries/Makefile # * rts/dotnet/Makefile # * utils/Makefile -# * docbook PDFs, e.g. "dblatex -T db2latex users_guide.xml" # * GhcProfiled # * optionally install stage3? # * shared libraries, way dyn @@ -321,7 +316,7 @@ endif PACKAGES += haskeline ifneq "$(wildcard libraries/dph)" "" -PACKAGES += \ +PACKAGES_STAGE2 += \ dph/dph-base \ dph/dph-prim-interface \ dph/dph-prim-seq \ @@ -333,9 +328,9 @@ endif BOOT_PKGS = Cabal hpc extensible-exceptions # The actual .a and .so/.dll files: needed for dependencies. -ALL_LIBS = $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_v_LIB)) +ALL_STAGE1_LIBS = $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_v_LIB)) ifeq "$(BuildSharedLibs)" "YES" -ALL_LIBS += $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_dyn_LIB)) +ALL_STAGE1_LIBS += $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_dyn_LIB)) endif BOOT_LIBS = $(foreach lib,$(BOOT_PKGS),$(libraries/$(lib)_dist-boot_v_LIB)) @@ -355,18 +350,20 @@ endif # know the dependencies until we've generated the pacakge-data.mk # files. define fixed_pkg_dep -libraries/$1/$2/package-data.mk : $(GHC_PKG_INPLACE) $$(if $$(fixed_pkg_prev),libraries/$$(fixed_pkg_prev)/$2/package-data.mk) +libraries/$1/$2/package-data.mk : $$(GHC_PKG_INPLACE) $$(if $$(fixed_pkg_prev),libraries/$$(fixed_pkg_prev)/$2/package-data.mk) fixed_pkg_prev:=$1 endef ifneq "$(BINDIST)" "YES" fixed_pkg_prev= -$(foreach pkg,$(PACKAGES),$(eval $(call fixed_pkg_dep,$(pkg),dist-install))) +$(foreach pkg,$(PACKAGES) $(PACKAGES_STAGE2),$(eval $(call fixed_pkg_dep,$(pkg),dist-install))) # We assume that the stage2 compiler depends on all the libraries, so # they all get added to the package database before we try to configure # it -compiler/stage2/package-data.mk: $(foreach pkg,$(PACKAGES),libraries/$(pkg)/dist-install/package-data.mk) +compiler/stage2/package-data.mk: $(foreach pkg,$(PACKAGES) $(PACKAGES_STAGE2),libraries/$(pkg)/dist-install/package-data.mk) +ghc/stage1/package-data.mk: compiler/stage1/package-data.mk +ghc/stage2/package-data.mk: compiler/stage2/package-data.mk # haddock depends on ghc and some libraries, but depending on GHC's # package-data.mk is sufficient, as that in turn depends on all the # libraries @@ -483,7 +480,9 @@ endif BUILD_DIRS += \ utils/haddock \ + utils/haddock/doc \ $(patsubst %, libraries/%, $(PACKAGES)) \ + $(patsubst %, libraries/%, $(PACKAGES_STAGE2)) \ compiler \ $(GHC_HSC2HS_DIR) \ $(GHC_PKG_DIR) \ @@ -525,7 +524,7 @@ compiler_stage2_DISABLE = YES compiler_stage3_DISABLE = YES ghc_stage2_DISABLE = YES ghc_stage3_DISABLE = YES -$(foreach lib,$(PACKAGES),$(eval \ +$(foreach lib,$(PACKAGES) $(PACKAGES_STAGE2),$(eval \ libraries/$(lib)_dist-install_DISABLE = YES)) endif @@ -541,7 +540,10 @@ GhcBootLibHcOpts += -fno-warn-deprecated-flags endif # Add $(GhcLibHcOpts) to all library builds -$(foreach pkg,$(PACKAGES),$(eval libraries/$(pkg)_dist-install_HC_OPTS += $$(GhcLibHcOpts))) +$(foreach pkg,$(PACKAGES) $(PACKAGES_STAGE2),$(eval libraries/$(pkg)_dist-install_HC_OPTS += $$(GhcLibHcOpts))) + +# XXX Hack; remove this +$(foreach pkg,$(PACKAGES_STAGE2),$(eval libraries/$(pkg)_dist-install_HC_OPTS += -Wwarn)) # XXX we configure packages with the bootsrapping compiler (for # dependency reasons, see the phase ordering), which doesn't @@ -699,7 +701,7 @@ install_packages: libffi/package.conf.install rts/package.conf.install echo "[]" > $(INSTALLED_PACKAGE_CONF) $(INSTALLED_GHC_PKG_REAL) --force --global-conf $(INSTALLED_PACKAGE_CONF) update libffi/package.conf.install $(INSTALLED_GHC_PKG_REAL) --force --global-conf $(INSTALLED_PACKAGE_CONF) update rts/package.conf.install - $(foreach p, $(PACKAGES),\ + $(foreach p, $(PACKAGES) $(PACKAGES_STAGE2),\ $(GHC_CABAL_INPLACE) install \ $(INSTALLED_GHC_PKG_REAL) \ $(INSTALLED_PACKAGE_CONF) \ @@ -722,7 +724,7 @@ $(eval $(call bindist,.,\ mk/config.mk.in \ $(INPLACE_BIN)/mkdirhier \ $(INPLACE_BIN)/ghc-cabal \ - utils/pwd/pwd \ + utils/ghc-pwd/ghc-pwd \ $(BINDIST_WRAPPERS) \ $(BINDIST_LIBS) \ $(BINDIST_HI) \ @@ -865,6 +867,11 @@ endif .PHONY: clean +CLEAN_FILES += utils/ghc-pwd/ghc-pwd +CLEAN_FILES += utils/ghc-pwd/ghc-pwd.exe +CLEAN_FILES += utils/ghc-pwd/ghc-pwd.hi +CLEAN_FILES += utils/ghc-pwd/ghc-pwd.o + clean : clean_files .PHONY: clean_files clean_files : @@ -891,3 +898,6 @@ maintainer-clean : distclean $(RM) libraries/process/include/HsProcessConfig.h.in $(RM) libraries/unix/include/HsUnixConfig.h.in $(RM) libraries/old-time/include/HsTimeConfig.h.in + +.PHONY: all_libraries +