X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc.mk;h=89de086af2878269f82aa04c7f85f7fc3f76a7e4;hb=2b1d153a60b9f8720bda74180d50a0aed2d02af2;hp=a9ad5ea9fff536fa3cdb594690e412e052829d13;hpb=ecc60710f04cce34c121af1a17416c7140d364f2;p=ghc-hetmet.git diff --git a/ghc.mk b/ghc.mk index a9ad5ea..89de086 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 @@ -345,6 +350,10 @@ $(eval $(call addPackage,haskeline)) $(foreach pkg,$(EXTRA_PACKAGES),$(eval $(call addPackage,$(pkg)))) ifneq "$(BootingFromHc)" "YES" + +ifneq "$(CLEANING) $(GhcProfiled)" "NO 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/dph-base \ dph/dph-prim-interface \ @@ -353,6 +362,7 @@ PACKAGES_STAGE2 += \ dph/dph-seq \ dph/dph-par endif +endif # We assume that the stage0 compiler has a suitable bytestring package, # so we don't have to include it below. @@ -520,6 +530,7 @@ BUILD_DIRS += \ driver \ driver/ghci \ driver/ghc \ + driver/haddock \ libffi \ includes \ rts @@ -531,11 +542,9 @@ BUILD_DIRS += \ $(GHC_GENAPPLY_DIR) endif -ifneq "$(HADDOCK_DOCS)" "NO" BUILD_DIRS += \ utils/haddock \ utils/haddock/doc -endif ifneq "$(CLEANING)" "YES" BUILD_DIRS += \ @@ -647,21 +656,6 @@ GhcBootLibHcOpts += -fno-warn-deprecated-flags # Add $(GhcLibHcOpts) to all library builds $(foreach pkg,$(PACKAGES) $(PACKAGES_STAGE2),$(eval libraries/$(pkg)_dist-install_HC_OPTS += $$(GhcLibHcOpts))) -# XXX Hack; remove this -# Use -Wwarn for dph -$(foreach pkg,$(PACKAGES_STAGE2),$(eval libraries/$(pkg)_dist-install_HC_OPTS += -Wwarn)) - -# XXX Hack; remove this -# Use -Wwarn for 'binary' becuase it has redundant UNPACK pragmas -libraries/binary_dist-install_HC_OPTS += -Wwarn -libraries/binary_dist-boot_HC_OPTS += -Wwarn - -# XXX hack: xhtml has warnings -libraries/xhtml_dist-install_HC_OPTS += -Wwarn - -# XXX hack: haskeline has warnings about deprecated use of block/unblock -libraries/haskeline_dist-install_HC_OPTS += -Wwarn - # ---------------------------------------------- # A useful pseudo-target .PHONY: stage1_libs @@ -914,18 +908,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