X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc.mk;h=fadaccdcf54955f762b3b05cb6421fd05fdbd6c9;hb=c9020b2b6b0bee7ebe6f7bb0ba1b93680b0922c5;hp=8e398429b9b86e8976368dfe77f1c8237e897fc7;hpb=75736ff2a36d165eed7c216b3fd510d525094b79;p=ghc-hetmet.git diff --git a/ghc.mk b/ghc.mk index 8e39842..fadaccd 100644 --- a/ghc.mk +++ b/ghc.mk @@ -345,6 +345,10 @@ $(eval $(call addPackage,haskeline)) $(foreach pkg,$(EXTRA_PACKAGES),$(eval $(call addPackage,$(pkg)))) ifneq "$(BootingFromHc)" "YES" + +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/dph-base \ dph/dph-prim-interface \ @@ -353,6 +357,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 +525,7 @@ BUILD_DIRS += \ driver \ driver/ghci \ driver/ghc \ + driver/haddock \ libffi \ includes \ rts @@ -531,11 +537,9 @@ BUILD_DIRS += \ $(GHC_GENAPPLY_DIR) endif -ifneq "$(HADDOCK_DOCS)" "NO" BUILD_DIRS += \ utils/haddock \ utils/haddock/doc -endif ifneq "$(CLEANING)" "YES" BUILD_DIRS += \ @@ -591,18 +595,6 @@ ifneq "$(findstring $(phase),0 1 2)" "" ghc_stage1_DISABLE = YES endif -ifneq "$(CLEANING)" "YES" -ifeq "$(INTEGER_LIBRARY)" "integer-gmp" -libraries/base_dist-install_CONFIGURE_OPTS += --flags=-integer-simple -else - ifeq "$(INTEGER_LIBRARY)" "integer-simple" - libraries/base_dist-install_CONFIGURE_OPTS += --flags=integer-simple - else -$(error Unknown integer library: $(INTEGER_LIBRARY)) - endif -endif -endif - ifneq "$(findstring $(phase),0 1 2 3)" "" # In phases 0-3, we disable stage2-3, the full libraries and haddock utils/haddock_dist_DISABLE = YES @@ -620,6 +612,18 @@ $(foreach lib,$(PACKAGES) $(PACKAGES_STAGE2),$(eval \ libraries/$(lib)_dist-install_DISABLE = YES)) endif +ifneq "$(CLEANING)" "YES" +ifeq "$(INTEGER_LIBRARY)" "integer-gmp" +libraries/base_dist-install_CONFIGURE_OPTS += --flags=-integer-simple +else + ifeq "$(INTEGER_LIBRARY)" "integer-simple" + libraries/base_dist-install_CONFIGURE_OPTS += --flags=integer-simple + else +$(error Unknown integer library: $(INTEGER_LIBRARY)) + endif +endif +endif + # These packages don't pass the Cabal checks because hs-source-dirs # points outside the source directory. This isn't a real problem in # these cases, so we just skip checking them. @@ -647,21 +651,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