diff options
Diffstat (limited to 'rules/manual-package-config.mk')
-rw-r--r-- | rules/manual-package-config.mk | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/rules/manual-package-config.mk b/rules/manual-package-config.mk index 64d6f1aec6..0c43f6247d 100644 --- a/rules/manual-package-config.mk +++ b/rules/manual-package-config.mk @@ -14,16 +14,17 @@ define manual-package-config # args: # $1 = dir -# $2 = stage -$(call trace, manual-package-config($1, $2)) -$(call profStart, manual-package-config($1, $2)) +# $2 = distdir +# $3 = stage +$(call trace, manual-package-config($1, $2, $3)) +$(call profStart, manual-package-config($1, $2, $3)) -$1/dist/package.conf.inplace : $1/package.conf.in $$$$(ghc-pkg_INPLACE) | $$$$(dir $$$$@)/. +$1/$2/package.conf.inplace : $1/package.conf.in $$$$(ghc-pkg_INPLACE) | $$$$(dir $$$$@)/. $$(HS_CPP) -P \ -DTOP='"$$(TOP)"' \ $$($1_PACKAGE_CPP_OPTS) \ $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) \ - -I$$(BUILD_$2_INCLUDE_DIR) \ + -I$$(BUILD_$3_INCLUDE_DIR) \ -x c $$< -o $$@.raw grep -v '^#pragma GCC' $$@.raw | \ sed -e 's/""//g' -e 's/:[ ]*,/: /g' > $$@ @@ -32,18 +33,18 @@ $1/dist/package.conf.inplace : $1/package.conf.in $$$$(ghc-pkg_INPLACE) | $$$$(d # This is actually a real file, but we need to recreate it on every # "make install", so we declare it as phony -.PHONY: $1/dist/package.conf.install -$1/dist/package.conf.install: | $$$$(dir $$$$@)/. +.PHONY: $1/$2/package.conf.install +$1/$2/package.conf.install: | $$$$(dir $$$$@)/. $$(HS_CPP) -P \ -DINSTALLING \ -DLIB_DIR='"$$(if $$(filter YES,$$(RelocatableBuild)),$$$$topdir,$$(ghclibdir))"' \ -DINCLUDE_DIR='"$$(if $$(filter YES,$$(RelocatableBuild)),$$$$topdir,$$(ghclibdir))/include"' \ $$($1_PACKAGE_CPP_OPTS) \ $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) \ - -I$$(BUILD_$2_INCLUDE_DIR) \ + -I$$(BUILD_$3_INCLUDE_DIR) \ -x c $1/package.conf.in -o $$@.raw grep -v '^#pragma GCC' $$@.raw | \ sed -e 's/""//g' -e 's/:[ ]*,/: /g' >$$@ -$(call profEnd, manual-package-config($1, $2)) +$(call profEnd, manual-package-config($1, $2, $3)) endef |