summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-11-11 05:36:50 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-15 10:18:32 -0500
commit25d36c3178945d926f936ee32e57894d1743063c (patch)
tree9b1e21bcbb3be1775af7d608e10ea4fd322144ff /rules
parent3e5f0595eaa732fdbf1c273194280105bb5bd862 (diff)
downloadhaskell-25d36c3178945d926f936ee32e57894d1743063c.tar.gz
Make: Get rid of GHC_INCLUDE_DIRS
These dirs should not be included in all stages. Instead make the per-stage `BUILD_*_INCLUDE_DIR` "plural" to insert `rts/include` in the right place.
Diffstat (limited to 'rules')
-rw-r--r--rules/hs-suffix-way-rules-srcdir.mk6
-rw-r--r--rules/manual-package-config.mk6
2 files changed, 4 insertions, 8 deletions
diff --git a/rules/hs-suffix-way-rules-srcdir.mk b/rules/hs-suffix-way-rules-srcdir.mk
index 1d01f95219..f9ab09107a 100644
--- a/rules/hs-suffix-way-rules-srcdir.mk
+++ b/rules/hs-suffix-way-rules-srcdir.mk
@@ -38,16 +38,14 @@ $1/$2/build/%.$$($3_hcsuf) : $1/$4/%.lhs $$(LAX_DEPS_FOLLOW) $$$$($1_$2_HC_DEP)
$1/$2/build/%.$$($3_osuf) : $1/$4/%.hc $$(includes_$5_H_CONFIG) $$(includes_$5_H_PLATFORM) | $$$$(dir $$$$@)/.
$$(call cmd,$1_$2_CC) \
$$($1_$2_$3_ALL_CC_OPTS) \
- $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) \
- -I$$(BUILD_$5_INCLUDE_DIR) \
+ $$(addprefix -I,$$(BUILD_$5_INCLUDE_DIRS)) \
-x c -c $$< -o $$@ \
$$(if $$(findstring YES,$$($1_$2_DYNAMIC_TOO)),-dyno $$(addsuffix .$$(dyn_osuf),$$(basename $$@)))
$1/$2/build/%.$$($3_osuf) : $1/$2/build/%.hc $$(includes_$5_H_CONFIG) $$(includes_$5_H_PLATFORM)
$$(call cmd,$1_$2_CC) \
$$($1_$2_$3_ALL_CC_OPTS) \
- $$(addprefix -I,$$(GHC_INCLUDE_DIRS)) \
- -I$$(BUILD_$5_INCLUDE_DIR) \
+ $$(addprefix -I,$$(BUILD_$5_INCLUDE_DIRS)) \
-x c -c $$< -o $$@ \
$$(if $$(findstring YES,$$($1_$2_DYNAMIC_TOO)),-dyno $$(addsuffix .$$(dyn_osuf),$$(basename $$@)))
diff --git a/rules/manual-package-config.mk b/rules/manual-package-config.mk
index 72c3a369b6..dcd0e758bc 100644
--- a/rules/manual-package-config.mk
+++ b/rules/manual-package-config.mk
@@ -23,8 +23,7 @@ $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_$3_INCLUDE_DIR) \
+ $$(addprefix -I,$$(BUILD_$3_INCLUDE_DIRS)) \
-x c $$< -o $$@.raw
grep -v '^#pragma GCC' $$@.raw | \
sed -e 's/""//g' -e 's/:[ ]*,/: /g' > $$@
@@ -40,8 +39,7 @@ $1/$2/package.conf.install : $1/package.conf.in | $$$$(dir $$$$@)/.
-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,$$(GHC_INCLUDE_DIRS)) \
- -I$$(BUILD_$3_INCLUDE_DIR) \
+ $$(addprefix -I,$$(BUILD_$3_INCLUDE_DIRS)) \
-x c $1/package.conf.in -o $$@.raw
grep -v '^#pragma GCC' $$@.raw | \
sed -e 's/""//g' -e 's/:[ ]*,/: /g' >$$@