just-makefiles:
@:
+ifneq "$(CLEANING)" "YES"
+CLEANING = NO
+endif
+
# -----------------------------------------------------------------------------
# Misc GNU make utils
endif
endef
+INTREE_ONLY_PACKAGES := haskeline mtl terminfo utf8-string xhtml
+
+$(foreach p,$(INTREE_ONLY_PACKAGES),$(eval libraries/$p_dist-install_HADDOCK_ME = NO))
+
$(eval $(call addPackage,ghc-prim))
ifeq "$(CLEANING)" "YES"
$(eval $(call addPackage,integer-gmp))
$(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 \
+# ------------------- Adding DPH packaes ---------------
+
+# 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
endif
-endif
+endif # BootingFromHc
+# -------------------------------------------------------
+
# We assume that the stage0 compiler has a suitable bytestring package,
# so we don't have to include it below.
INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(bindir)/ghc-pkg.exe
endif
-INSTALLED_PACKAGES := $(filter-out haskeline mtl terminfo utf8-string xhtml,$(PACKAGES))
+INSTALLED_PACKAGES := $(filter-out $(INTREE_ONLY_PACKAGES),$(PACKAGES))
ifeq "$(InstallExtraPackages)" "NO"
INSTALLED_PACKAGES := $(filter-out $(EXTRA_PACKAGES), $(INSTALLED_PACKAGES))
endif