diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-11-13 15:38:21 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-11-16 03:13:10 -0500 |
commit | 3e94b5a7ebddf156f00599c6bd2e9ba1af437a6c (patch) | |
tree | 7c4baf6a8c660cce215a79634a545991f073b4c3 /rts | |
parent | 85f2c0ba760377e68673d9efb336ac762e04683c (diff) | |
download | haskell-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 'rts')
-rw-r--r-- | rts/ghc.mk | 25 | ||||
-rw-r--r-- | rts/include/ghc.mk | 14 |
2 files changed, 25 insertions, 14 deletions
diff --git a/rts/ghc.mk b/rts/ghc.mk index 211741a2a9..6da6b2137e 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -214,7 +214,7 @@ rts_$1_DTRACE_OBJS = rts/dist-install/build/RtsProbes.$$($1_osuf) $$(rts_$1_DTRACE_OBJS) : $$(rts_$1_OBJS) $(DTRACE) -G -C \ - $$(addprefix -I,$$(BUILD_1_INCLUDE_DIRS)) \ + $$(addprefix -Irts/,$$(rts_dist-install_DIST_INCLUDE_DIRS)) \ -DDTRACE -s rts/RtsProbes.d \ -o $$@ \ $$(rts_$1_OBJS) @@ -377,22 +377,23 @@ WARNING_OPTS += -Wno-aggregate-return # support for registerised builds on this arch. -- BL 2010/02/03 # WARNING_OPTS += -Wcast-align -STANDARD_OPTS += \ - $(addprefix -I,$(BUILD_1_INCLUDE_DIRS)) \ - -Irts \ - -Irts/dist-install/build +rts_INCLUDE_DIRS = \ + $(addprefix include/,$(includes_INCLUDE_DIRS)) \ + . + +rts_dist-install_INCLUDE_DIRS = \ + $(addprefix include/,$(includes_dist-install_INCLUDE_DIRS)) # COMPILING_RTS is only used when building Win32 DLL support. -STANDARD_OPTS += -DCOMPILING_RTS -DFS_NAMESPACE=rts +rts_CPP_OPTS += -DCOMPILING_RTS -DFS_NAMESPACE=rts # HC_OPTS is included in both .c and .cmm compilations, whereas CC_OPTS is # only included in .c compilations. HC_OPTS included the WAY_* opts, which # must be included in both types of compilations. rts_CC_OPTS += $(WARNING_OPTS) -rts_CC_OPTS += $(STANDARD_OPTS) -rts_HC_OPTS += $(STANDARD_OPTS) -this-unit-id rts +rts_HC_OPTS += -this-unit-id rts ifneq "$(GhcWithSMP)" "YES" rts_CC_OPTS += -DNOSMP @@ -620,7 +621,7 @@ endif DTRACEPROBES_SRC = rts/RtsProbes.d $(DTRACEPROBES_H): $(DTRACEPROBES_SRC) $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) | $$(dir $$@)/. - "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $< + "$(DTRACE)" $(filter -I%,$(rts_dist-install_DIST_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $< endif # ----------------------------------------------------------------------------- @@ -635,7 +636,11 @@ ifeq "$(HaveLibMingwEx)" "YES" rts_PACKAGE_CPP_OPTS += -DHAVE_LIBMINGWEX endif -$(eval $(call manual-package-config,rts,dist-install,1)) +rts_dist-install_PACKAGE_CPP_OPTS = \ + $(rts_PACKAGE_CPP_OPTS) \ + $(addprefix -Irts/,$(rts_dist-install_DIST_INCLUDE_DIRS)) + +$(eval $(call manual-package-config,rts,dist-install)) rts/dist-install/package.conf.inplace : $(includes_dist-install_H_FILES) rts/dist-install/package.conf.install : $(includes_dist-install_H_FILES) diff --git a/rts/include/ghc.mk b/rts/include/ghc.mk index 12d14b9152..1b0fbff077 100644 --- a/rts/include/ghc.mk +++ b/rts/include/ghc.mk @@ -19,8 +19,15 @@ includes_2_H_CONFIG = $(includes_1_H_CONFIG) includes_1_H_PLATFORM = rts/dist-install/build/include/ghcplatform.h includes_2_H_PLATFORM = $(includes_1_H_PLATFORM) -BUILD_1_INCLUDE_DIRS = rts/include rts/dist-install/build/include -BUILD_2_INCLUDE_DIRS = $(BUILD_1_INCLUDE_DIRS) +includes_INCLUDE_DIRS = . +# "includes" isn't really a separate component, but just part of the RTS that +# is in a separate ghc.mk for historical reasons. The ../dist-install puts the +# build products with the rest of the RTS's. +includes_dist-install_INCLUDE_DIRS = ../dist-install/build/include + +includes_dist-install_DIST_INCLUDE_DIRS = \ + $(includes_INCLUDE_DIRS) \ + $(includes_dist-install_INCLUDE_DIRS) # # All header files are in rts/include/{one of these subdirectories} @@ -63,8 +70,7 @@ ifeq "$(GhcUnregisterised)" "YES" includes_CC_OPTS += -DUSE_MINIINTERPRETER endif -includes_CC_OPTS += $(addprefix -I,$(BUILD_1_INCLUDE_DIRS)) -includes_CC_OPTS += -Irts +includes_CC_OPTS += $(addprefix -Irts/,$(rts_dist-install_DIST_INCLUDE_DIRS)) ifneq "$(GhcWithSMP)" "YES" includes_CC_OPTS += -DNOSMP |