diff options
Diffstat (limited to 'rules/build-dependencies.mk')
-rw-r--r-- | rules/build-dependencies.mk | 9 |
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 \ |