endif
# -----------------------------------------------------------------------------
+# Utility definitions
+
+include rules/make-command.mk
+
+# -----------------------------------------------------------------------------
# Macros for standard targets
include rules/all-target.mk
$(eval $(call addPackage,random))
$(eval $(call addPackage,extensible-exceptions))
$(eval $(call addPackage,haskell98))
+$(eval $(call addPackage,haskell2010))
$(eval $(call addPackage,hpc))
$(eval $(call addPackage,pretty))
$(eval $(call addPackage,template-haskell))
$(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 \
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.
# libraries
utils/haddock/dist/package-data.mk: compiler/stage2/package-data.mk
+utils/ghc-pkg/dist-install/package-data.mk: compiler/stage2/package-data.mk
utils/hsc2hs/dist-install/package-data.mk: compiler/stage2/package-data.mk
utils/compare_sizes/dist/package-data.mk: compiler/stage2/package-data.mk
driver \
driver/ghci \
driver/ghc \
+ driver/haddock \
libffi \
includes \
rts
$(GHC_GENAPPLY_DIR)
endif
-ifneq "$(HADDOCK_DOCS)" "NO"
BUILD_DIRS += \
utils/haddock \
utils/haddock/doc
-endif
ifneq "$(CLEANING)" "YES"
BUILD_DIRS += \
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
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.
# 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
-
# ----------------------------------------------
# A useful pseudo-target
.PHONY: stage1_libs
$(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
cd bindistprep && "$(TAR_CMD)" cf - $(BIN_DIST_NAME) | bzip2 -c > ../$(BIN_DIST_PREP_TAR_BZ2)
windows-installer:
-ifeq "$(ISCC)" ""
- @echo No ISCC, so not making installer
+ifeq "$(ISCC_CMD)" ""
+ @echo No ISCC_CMD, so not making installer
else
- "$(ISCC)" /O. /Fbindistprep/$(WINDOWS_INSTALLER_BASE) - < distrib/ghc.iss
+ "$(ISCC_CMD)" /O. /Fbindistprep/$(WINDOWS_INSTALLER_BASE) - < distrib/ghc.iss
endif
# tryTimes tries to run its third argument multiple times, until it