summaryrefslogtreecommitdiff
path: root/rules/manual-package-config.mk
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-11-13 15:38:21 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-16 03:13:10 -0500
commit3e94b5a7ebddf156f00599c6bd2e9ba1af437a6c (patch)
tree7c4baf6a8c660cce215a79634a545991f073b4c3 /rules/manual-package-config.mk
parent85f2c0ba760377e68673d9efb336ac762e04683c (diff)
downloadhaskell-3e94b5a7ebddf156f00599c6bd2e9ba1af437a6c.tar.gz
Make: Get rid of `BUILD_.*_INCLUDE_DIRS`
First, we improve some of the rules around -I include dirs, and CPP opts. Then, we just specify the RTS's include dirs normally (locally per the package and in the package conf), and then everything should work normally. The primops.txt.pp rule needs no extra include dirs at all, as it no longer bakes in a target platfom. Reverts some of the extra stage arguments I added in 05419e55cab272ed39790695f448b311f22669f7, as they are no longer needed.
Diffstat (limited to 'rules/manual-package-config.mk')
-rw-r--r--rules/manual-package-config.mk13
1 files changed, 5 insertions, 8 deletions
diff --git a/rules/manual-package-config.mk b/rules/manual-package-config.mk
index dcd0e758bc..a9993d9fae 100644
--- a/rules/manual-package-config.mk
+++ b/rules/manual-package-config.mk
@@ -15,15 +15,13 @@ define manual-package-config
# args:
# $1 = dir
# $2 = distdir
-# $3 = stage
-$(call trace, manual-package-config($1, $2, $3))
-$(call profStart, manual-package-config($1, $2, $3))
+$(call trace, manual-package-config($1, $2))
+$(call profStart, manual-package-config($1, $2))
$1/$2/package.conf.inplace : $1/package.conf.in $$$$(ghc-pkg_INPLACE) | $$$$(dir $$$$@)/.
$$(HS_CPP) -P \
-DTOP='"$$(TOP)"' \
- $$($1_PACKAGE_CPP_OPTS) \
- $$(addprefix -I,$$(BUILD_$3_INCLUDE_DIRS)) \
+ $$($1_$2_PACKAGE_CPP_OPTS) \
-x c $$< -o $$@.raw
grep -v '^#pragma GCC' $$@.raw | \
sed -e 's/""//g' -e 's/:[ ]*,/: /g' > $$@
@@ -38,11 +36,10 @@ $1/$2/package.conf.install : $1/package.conf.in | $$$$(dir $$$$@)/.
-DINSTALLING \
-DLIB_DIR='"$$(if $$(filter YES,$$(RelocatableBuild)),$$$$topdir,$$(ghclibdir))/$1"' \
-DINCLUDE_DIR='"$$(if $$(filter YES,$$(RelocatableBuild)),$$$$topdir,$$(ghclibdir))/$1/include"' \
- $$($1_PACKAGE_CPP_OPTS) \
- $$(addprefix -I,$$(BUILD_$3_INCLUDE_DIRS)) \
+ $$($1_$2_PACKAGE_CPP_OPTS) \
-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, $3))
+$(call profEnd, manual-package-config($1))
endef