summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-10-29 20:34:21 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-02 01:37:43 -0400
commitda1a8e2986731b767f5c977cb873034e771d9371 (patch)
treebc8c3743ee3e52a1e4bbcff6d69d129a05e757ce /rts
parent2f69d102d775f8a95f1c0b0f62d4fd630c4d1737 (diff)
downloadhaskell-da1a8e2986731b767f5c977cb873034e771d9371.tar.gz
Treat generated RTS headers in a more consistent manner
We can depend on all of them at once the same way.
Diffstat (limited to 'rts')
-rw-r--r--rts/ghc.mk5
-rw-r--r--rts/include/ghc.mk20
2 files changed, 24 insertions, 1 deletions
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 4bb17cb8ae..ba1e17ec2e 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -593,6 +593,8 @@ endif
$(eval $(call dependencies,rts,dist-install,1))
+$(rts_dist-install_depfile_c_asm) : $(includes_dist-install_H_FILES)
+
$(rts_dist-install_depfile_c_asm) : $(includes_1_H_CONFIG)
$(rts_dist-install_depfile_c_asm) : $(includes_1_H_PLATFORM)
$(rts_dist-install_depfile_c_asm) : $(includes_1_H_VERSION)
@@ -641,7 +643,8 @@ endif
$(eval $(call manual-package-config,rts,dist-install,1))
-rts/dist-install/package.conf.inplace : $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION)
+rts/dist-install/package.conf.inplace : $(includes_dist-install_H_FILES)
+rts/dist-install/package.conf.install : $(includes_dist-install_H_FILES)
# -----------------------------------------------------------------------------
# installing
diff --git a/rts/include/ghc.mk b/rts/include/ghc.mk
index 4482446aea..9e863f6305 100644
--- a/rts/include/ghc.mk
+++ b/rts/include/ghc.mk
@@ -42,6 +42,24 @@ includes_H_FILES := $(wildcard $(patsubst %,rts/include/%/*.h,$(includes_H_SUBDI
# This isn't necessary, but it makes the paths look a little prettier
includes_H_FILES := $(subst /./,/,$(includes_H_FILES))
+includes_H_FILES_GENERATED = \
+ ghcautoconf.h \
+ ghcplatform.h \
+ ghcversion.h
+
+# Unlike above, include generated files. We still need the previous list
+# without the generated files separtely and not just as part of this due to
+# lingering issues like the derived constants generation snooping the RTS
+# headers.
+define includesFilesWithGenerated
+# $1 = distdir
+includes_$1_H_FILES = \
+ $$(includes_H_FILES) \
+ $$(patsubst %,rts/$1/build/include/%,$$(includes_H_FILES_GENERATED))
+endef
+$(eval $(call includesFilesWithGenerated,dist))
+$(eval $(call includesFilesWithGenerated,dist-install))
+
#
# Options
#
@@ -285,6 +303,8 @@ $(includes_DERIVEDCONSTANTS): $(deriveConstants_INPLACE) $(includes_1_H_CONFIG)
$< --gen-header -o $@ --tmpdir $(dir $@) $(DERIVE_CONSTANTS_FLAGS_FOR_HEADER)
endif
+includes_dist-install_H_FILES += $(includes_DERIVEDCONSTANTS)
+
# ---------------------------------------------------------------------------
# Install all header files