X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc.mk;h=984e0fc1b115b20955641c4a089fd87cc6b2ce76;hb=86b891f0de066ff67c4197918227eda4dec55d22;hp=9e1026e00a6f40e7db533097b2c822159c8843ce;hpb=e51cdf9b6e54fb4052e46b6d7afb15e062928467;p=ghc-hetmet.git diff --git a/ghc.mk b/ghc.mk index 9e1026e..984e0fc 100644 --- a/ghc.mk +++ b/ghc.mk @@ -521,11 +521,12 @@ endif ifneq "$(CLEANING)" "YES" BUILD_DIRS += \ $(patsubst %, libraries/%, $(PACKAGES) $(PACKAGES_STAGE2)) +endif + ifneq "$(BootingFromHc)" "YES" BUILD_DIRS += \ libraries/dph endif -endif ifeq "$(INTEGER_LIBRARY)" "integer-gmp" BUILD_DIRS += libraries/integer-gmp/gmp @@ -816,6 +817,21 @@ endif INSTALLED_PACKAGES = $(filter-out haskeline mtl terminfo,$(PACKAGES)) HIDDEN_PACKAGES = binary +define set_INSTALL_DISTDIR +# $1 = libraries/base, $2 = dist-install +# => +# INSTALL_DISTDIR_libraries/base = dist-install +INSTALL_DISTDIR_$1 = $2 +endef + +$(eval $(foreach p,$(INSTALLED_PACKAGES) $(PACKAGES_STAGE2),\ +$(call set_INSTALL_DISTDIR,libraries/$p,dist-install))) +INSTALL_DISTDIR_compiler = stage2 + +ALL_INSTALLED_PACKAGES = $(addprefix libraries/,$(INSTALLED_PACKAGES)) \ + compiler \ + $(addprefix libraries/,$(PACKAGES_STAGE2)) + install_packages: install_libexecs install_packages: libffi/package.conf.install rts/package.conf.install $(INSTALL_DIR) $(DESTDIR)$(topdir) @@ -823,24 +839,17 @@ 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, $(INSTALLED_PACKAGES) $(PACKAGES_STAGE2),\ + $(foreach p, $(ALL_INSTALLED_PACKAGES),\ "$(GHC_CABAL_INPLACE)" install \ $(INSTALLED_GHC_REAL) \ $(INSTALLED_GHC_PKG_REAL) \ $(DESTDIR)$(topdir) \ - libraries/$p dist-install \ + $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 - "$(GHC_CABAL_INPLACE)" install \ - $(INSTALLED_GHC_REAL) \ - $(INSTALLED_GHC_PKG_REAL) \ - $(DESTDIR)$(topdir) \ - compiler stage2 \ - '$(DESTDIR)' '$(prefix)' '$(ghclibdir)' '$(docdir)/html/libraries' \ - $(RelocatableBuild) # ----------------------------------------------------------------------------- # Binary distributions