summaryrefslogtreecommitdiff
path: root/rules/build-dependencies.mk
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-10-04 20:44:41 +0100
committerIan Lynagh <ian@well-typed.com>2012-10-04 22:13:58 +0100
commitb49ad6bb4e85bc16b60c176672b448e30d333d7c (patch)
treece38d5639ea9315bef4839ea00d62916ba44c7a2 /rules/build-dependencies.mk
parent16a8414061a1fef7d90e162e5253d3005cb11806 (diff)
downloadhaskell-b49ad6bb4e85bc16b60c176672b448e30d333d7c.tar.gz
Load the right object files in ghci
When we have a dynamic ghc, we need to load the dynamic object files
Diffstat (limited to 'rules/build-dependencies.mk')
-rw-r--r--rules/build-dependencies.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk
index edde237784..903dc9c2c8 100644
--- a/rules/build-dependencies.mk
+++ b/rules/build-dependencies.mk
@@ -38,6 +38,15 @@ ifneq "$$($1_$2_HS_SRCS)" ""
$$(filter-out -split-objs, $$($1_$2_$$(firstword $$($1_$2_WAYS))_ALL_HC_OPTS)) \
$$($1_$2_HS_SRCS)
endif
+# We use the GHCI_WAY object files when doing TH for all ways. We
+# therefore need the GHCI_WAY object files available when compiling
+# the other ways, in case we're compiling something that uses TH.
+ifneq "$$(filter $$(GHCI_WAY),$$($1_$2_WAYS))" ""
+ $$(foreach w,$$(filter-out $$(GHCI_WAY),$$($1_$2_WAYS)),\
+ $$(foreach o,$$($1_$2_$$w_HS_OBJS),\
+ $$(call make-command,\
+ echo "$$o: $$(basename $$o).$$($$(GHCI_WAY)_osuf)" >> $$@.tmp)))
+endif
echo "$1_$2_depfile_haskell_EXISTS = YES" >> $$@.tmp
ifneq "$$($1_$2_SLASH_MODS)" ""
for dir in $$(sort $$(foreach mod,$$($1_$2_SLASH_MODS),$1/$2/build/$$(dir $$(mod)))); do \