From da1a8e2986731b767f5c977cb873034e771d9371 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 29 Oct 2021 20:34:21 -0400 Subject: Treat generated RTS headers in a more consistent manner We can depend on all of them at once the same way. --- rts/ghc.mk | 5 ++++- rts/include/ghc.mk | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'rts') 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 -- cgit v1.2.1