X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc.mk;h=3214c656e24d1c12f2237335ec96e16ce842f9f1;hb=9eba9078e1993db58b8e12e9287f448df64a4fb6;hp=5a1864e7d169d537b16aac4181add4efac468d4d;hpb=8ca5375714268a61d2549b02204bb44745cb4cbf;p=ghc-hetmet.git diff --git a/ghc.mk b/ghc.mk index 5a1864e..3214c65 100644 --- a/ghc.mk +++ b/ghc.mk @@ -147,6 +147,11 @@ endif endif # ----------------------------------------------------------------------------- +# Utility definitions + +include rules/make-command.mk + +# ----------------------------------------------------------------------------- # Macros for standard targets include rules/all-target.mk @@ -344,15 +349,28 @@ $(eval $(call addPackage,haskeline)) $(foreach pkg,$(EXTRA_PACKAGES),$(eval $(call addPackage,$(pkg)))) -ifneq "$(BootingFromHc)" "YES" -PACKAGES_STAGE2 += \ - dph/dph-base \ + +# ------------------- Adding DPH packaes --------------- +DPH_PACKAGES = dph/dph-base \ dph/dph-prim-interface \ dph/dph-prim-seq \ dph/dph-prim-par \ dph/dph-seq \ dph/dph-par -endif +ifneq "$(BootingFromHc)" "YES" +ifeq "$(CLEANING)" "YES" +# If we are cleaning we must add DPH packages regardless, +# for reasons we now forget +PACKAGES_STAGE2 += $(DPH_PACKAGES) +else # not CLEANING +ifneq "$(GhcProfiled)" "YES" +# DPH uses Template Haskell, and Template Haskell doesn't work +# with a profiled compiler. So if stage-2 is profile, don't build DPH +PACKAGES_STAGE2 += $(DPH_PACKAGES) +endif # GhcProfiled +endif # Cleaning +endif # BootingFromHc +# ------------------------------------------------------- # We assume that the stage0 compiler has a suitable bytestring package, # so we don't have to include it below. @@ -520,6 +538,7 @@ BUILD_DIRS += \ driver \ driver/ghci \ driver/ghc \ + driver/haddock \ libffi \ includes \ rts @@ -563,6 +582,11 @@ BUILD_DIRS += \ $(GHC_TOUCHY_DIR) endif +ifneq "$(BINDIST)" "YES" +BUILD_DIRS += \ + utils/mkUserGuidePart +endif + BUILD_DIRS += utils/count_lines BUILD_DIRS += utils/compare_sizes @@ -597,6 +621,7 @@ utils/ghctags_dist_DISABLE = YES utils/hpc_dist_DISABLE = YES utils/hsc2hs_dist-install_DISABLE = YES utils/ghc-pkg_dist-install_DISABLE = YES +utils/mkUserGuidePart_dist_DISABLE = YES utils/compare_sizes_dist_DISABLE = YES compiler_stage2_DISABLE = YES compiler_stage3_DISABLE = YES @@ -897,18 +922,23 @@ install_packages: libffi/package.conf.install rts/package.conf.install $(INSTALL_DIR) "$(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, $(ALL_INSTALLED_PACKAGES),\ - "$(GHC_CABAL_INPLACE)" install \ - "$(INSTALLED_GHC_REAL)" \ - "$(INSTALLED_GHC_PKG_REAL)" \ - "$(STRIP_CMD)" \ - "$(DESTDIR)$(topdir)" \ - $p $(INSTALL_DISTDIR_$p) \ - '$(DESTDIR)' '$(prefix)' '$(ghclibdir)' '$(docdir)/html/libraries' \ - $(RelocatableBuild) &&) true - $(foreach p, $(HIDDEN_PACKAGES),\ - "$(INSTALLED_GHC_PKG_REAL)" --global-conf "$(INSTALLED_PACKAGE_CONF)" \ - hide $p &&) true + $(foreach p, $(ALL_INSTALLED_PACKAGES), \ + $(call make-command, \ + "$(GHC_CABAL_INPLACE)" install \ + "$(INSTALLED_GHC_REAL)" \ + "$(INSTALLED_GHC_PKG_REAL)" \ + "$(STRIP_CMD)" \ + "$(DESTDIR)$(topdir)" \ + $p $(INSTALL_DISTDIR_$p) \ + '$(DESTDIR)' \ + '$(prefix)' \ + '$(ghclibdir)' \ + '$(docdir)/html/libraries' \ + $(RelocatableBuild))) + $(foreach p, $(HIDDEN_PACKAGES), \ + $(call make-command, \ + "$(INSTALLED_GHC_PKG_REAL)" \ + --global-conf "$(INSTALLED_PACKAGE_CONF)" hide $p)) # ----------------------------------------------------------------------------- # Binary distributions