summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
Diffstat (limited to 'rts')
-rw-r--r--rts/ghc.mk6
-rw-r--r--rts/include/ghc.mk16
2 files changed, 8 insertions, 14 deletions
diff --git a/rts/ghc.mk b/rts/ghc.mk
index ba1e17ec2e..b4cef0956c 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -595,10 +595,6 @@ $(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)
-
$(rts_dist-install_depfile_c_asm) : $(DTRACEPROBES_H)
ifneq "$(UseSystemLibFFI)" "YES"
$(rts_dist-install_depfile_c_asm) : $(libffi_HEADERS)
@@ -625,7 +621,7 @@ DTRACE_FLAGS = -x cpppath=$(CC)
endif
DTRACEPROBES_SRC = rts/RtsProbes.d
-$(DTRACEPROBES_H): $(DTRACEPROBES_SRC) $(includes_1_H_PLATFORM) | $$(dir $$@)/.
+$(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 $<
endif
diff --git a/rts/include/ghc.mk b/rts/include/ghc.mk
index 9e863f6305..7c26499ce4 100644
--- a/rts/include/ghc.mk
+++ b/rts/include/ghc.mk
@@ -55,6 +55,8 @@ define includesFilesWithGenerated
# $1 = distdir
includes_$1_H_FILES = \
$$(includes_H_FILES) \
+ $$(includes_$1_H_FILES_GENERATED)
+includes_$1_H_FILES_GENERATED = \
$$(patsubst %,rts/$1/build/include/%,$$(includes_H_FILES_GENERATED))
endef
$(eval $(call includesFilesWithGenerated,dist))
@@ -303,31 +305,27 @@ $(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)
+includes_dist-install_H_FILES_GENERATED += $(includes_DERIVEDCONSTANTS)
# ---------------------------------------------------------------------------
# Install all header files
$(eval $(call clean-target,includes,,\
- $(includes_0_H_CONFIG) $(includes_0_H_PLATFORM) $(includes_0_H_VERSION) \
- $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION)))
+ $(foreach distdir,dist dist-install,$(includes_$(distdir)_H_FILES_GENERATED))))
$(eval $(call all-target,includes,\
- $(includes_0_H_CONFIG) $(includes_0_H_PLATFORM) $(includes_0_H_VERSION) \
- $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION) \
- $(includes_DERIVEDCONSTANTS)))
+ $(foreach distdir,dist dist-install,$(includes_$(distdir)_H_FILES_GENERATED))))
install: install_includes
.PHONY: install_includes
-install_includes : $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION)
+install_includes : $(includes_dist-install_H_FILES_GENERATED)
$(INSTALL_DIR) "$(DESTDIR)$(ghcheaderdir)"
$(foreach d,$(includes_H_SUBDIRS), \
$(INSTALL_DIR) "$(DESTDIR)$(ghcheaderdir)/$d" && \
$(INSTALL_HEADER) $(INSTALL_OPTS) rts/include/$d/*.h "$(DESTDIR)$(ghcheaderdir)/$d/" && \
) true
$(INSTALL_HEADER) $(INSTALL_OPTS) \
- $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM) $(includes_1_H_VERSION) \
- $(includes_DERIVEDCONSTANTS) \
+ $(includes_dist-install_H_FILES_GENERATED) \
"$(DESTDIR)$(ghcheaderdir)/"