summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-08-26 08:44:36 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-08-26 08:44:36 +0000
commite0b006bb4841fd22dfecee0c7dfe59e76e09c170 (patch)
tree5a724733a88f58b4bbf2d64eb2560a3b7806ef3c /ghc.mk
parentea0bfdada955e3f5de8c38b06c831f6dc64ba0f2 (diff)
downloadhaskell-e0b006bb4841fd22dfecee0c7dfe59e76e09c170.tar.gz
Fix the DPH package cleaning/profiled mess even more (the build was broken)
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk30
1 files changed, 17 insertions, 13 deletions
diff --git a/ghc.mk b/ghc.mk
index 3214c656e2..12b0d0c746 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -101,6 +101,10 @@ endif
just-makefiles:
@:
+ifneq "$(CLEANING)" "YES"
+CLEANING = NO
+endif
+
# -----------------------------------------------------------------------------
# Misc GNU make utils
@@ -351,27 +355,27 @@ $(foreach pkg,$(EXTRA_PACKAGES),$(eval $(call addPackage,$(pkg))))
# ------------------- Adding DPH packaes ---------------
-DPH_PACKAGES = dph/dph-base \
+
+# The DPH packages are added when:
+# * not BootingFromHc (they aren't necessary for bootstrapping), and
+# * not GhcProfiled (they need TH, so can't be compiled by a -prof GHC), or
+# * CLEANING: when cleaning we always enable everything
+
+# if !BootingFromHc && (!GhcProfiled || CLEANING)
+
+ifneq "$(BootingFromHc)" "YES"
+ifneq "$(GhcProfiled) $(CLEANING)" "NO YES"
+PACKAGES_STAGE2 += dph/dph-base \
dph/dph-prim-interface \
dph/dph-prim-seq \
dph/dph-prim-par \
dph/dph-seq \
dph/dph-par
-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
endif # BootingFromHc
# -------------------------------------------------------
+
# We assume that the stage0 compiler has a suitable bytestring package,
# so we don't have to include it below.
BOOT_PKGS = Cabal hpc extensible-exceptions binary bin-package-db