diff options
author | Ian Lynagh <igloo@earth.li> | 2009-04-26 11:42:15 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-04-26 11:42:15 +0000 |
commit | 34cc75e1a62638f2833815746ebce0a9114dc26b (patch) | |
tree | ef21e8fd7af1356beea9cce7d6efb8a65374e24c /rules/package-config.mk | |
parent | 74e1368d4688ee16f6decdf2cd3ebe27506b26ba (diff) | |
download | haskell-34cc75e1a62638f2833815746ebce0a9114dc26b.tar.gz |
GHC new build system megapatch
Diffstat (limited to 'rules/package-config.mk')
-rw-r--r-- | rules/package-config.mk | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/rules/package-config.mk b/rules/package-config.mk new file mode 100644 index 0000000000..111386e115 --- /dev/null +++ b/rules/package-config.mk @@ -0,0 +1,41 @@ + +define package-config # args: $1 = dir, $2 = distdir, $3 = GHC stage + +$1_$2_HC = $$(GHC_STAGE$3) + +# configuration stuff that depends on which GHC we're building with +ifeq "$3" "0" +$1_$2_ghc_ge_609 = $(ghc_ge_609) +$1_$2_HC_CONFIG = $$(GHC_STAGE0) +$1_$2_HC_CONFIG_DEP = +$1_$2_GHC_PKG = $$(GHC_PKG) +$1_$2_GHC_PKG_DEP = +$1_$2_HC_MK_DEPEND = $$($1_$2_HC) +# We can't make rules depend on the bootstrapping compiler, as then +# on cygwin we get a dep on c:/ghc/..., and make gets confused by the : +$1_$2_HC_MK_DEPEND_DEP = +$1_$2_HC_DEP = +ifeq "$$($1_$2_USE_BOOT_LIBS)" "YES" +$1_$2_HC_PKGCONF = -package-conf $(BOOTSTRAPPING_CONF) +$1_$2_GHC_PKG_OPTS = --package-conf=$$(BOOTSTRAPPING_CONF) +$1_$2_CONFIGURE_OPTS += --package-db=$$(TOP)/$$(BOOTSTRAPPING_CONF) +endif +else +$1_$2_ghc_ge_609 = YES +$1_$2_HC_PKGCONF = +$1_$2_HC_CONFIG = $$(TOP)/$$(DUMMY_GHC_INPLACE) +$1_$2_HC_CONFIG_DEP = $$(DUMMY_GHC_INPLACE) +$1_$2_GHC_PKG = $$(TOP)/$$(GHC_PKG_INPLACE) +$1_$2_GHC_PKG_DEP = $$(GHC_PKG_INPLACE) +$1_$2_GHC_PKG_OPTS = +# If stage is not 0 then we always use stage1 for making .depend, as later +# stages aren't available early enough +$1_$2_HC_MK_DEPEND = $$(GHC_STAGE1) +$1_$2_HC_MK_DEPEND_DEP = $$($1_$2_HC_MK_DEPEND) +$1_$2_HC_DEP = $$($1_$2_HC) +$1_$2_HC_OPTS += -no-user-package-conf +endif + +# Useful later +$1_$2_SLASH_MODS = $$(subst .,/,$$($1_$2_MODULES)) +endef |