From b49ad6bb4e85bc16b60c176672b448e30d333d7c Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 4 Oct 2012 20:44:41 +0100 Subject: Load the right object files in ghci When we have a dynamic ghc, we need to load the dynamic object files --- rules/build-dependencies.mk | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rules') 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 @@ -37,6 +37,15 @@ ifneq "$$($1_$2_HS_SRCS)" "" "$$($1_$2_HC_MK_DEPEND)" -M $$($1_$2_MKDEPENDHS_FLAGS) \ $$(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)" "" -- cgit v1.2.1