summaryrefslogtreecommitdiff
path: root/rules/build-dependencies.mk
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-11-02 21:42:33 +0000
committerIan Lynagh <ian@well-typed.com>2012-11-02 22:15:20 +0000
commitaf072fc35d8dbe7962e62700da052593e999c0ef (patch)
treee32ca8fbfa251cbd6e6734953183f3833d6b3094 /rules/build-dependencies.mk
parentd8684910b18203e0d15d3c77374382f5841e991d (diff)
downloadhaskell-af072fc35d8dbe7962e62700da052593e999c0ef.tar.gz
Change how dependency generation works; fixes #7381
We now do the initial dependency generation for the vanilla way regardless of what way flags and hisuf/osuf flags are given. This makes it easier to generate the right dependency info in the end.
Diffstat (limited to 'rules/build-dependencies.mk')
-rw-r--r--rules/build-dependencies.mk12
1 files changed, 1 insertions, 11 deletions
diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk
index 8442801cbe..4a4f5638e2 100644
--- a/rules/build-dependencies.mk
+++ b/rules/build-dependencies.mk
@@ -22,18 +22,8 @@ $1_$2_depfile_c_asm = $$($1_$2_depfile_base).c_asm
$1_$2_C_FILES_DEPS = $$(filter-out $$($1_$2_C_FILES_NODEPS),$$($1_$2_C_FILES))
-$1_$2_MKDEPENDHS_FLAGS = -dep-makefile $$($1_$2_depfile_haskell).tmp $$(foreach way,$$(filter-out v,$$($1_$2_WAYS)),-dep-suffix $$(way))
+$1_$2_MKDEPENDHS_FLAGS = -dep-makefile $$($1_$2_depfile_haskell).tmp $$(foreach way,$$($1_$2_WAYS),-dep-suffix "$$(patsubst %o,%,$$($$(way)_osuf))")
$1_$2_MKDEPENDHS_FLAGS += -include-pkg-deps
-# Setting hisuf/osuf is a kludge. If DYNAMIC_BY_DEFAULT is on, dyn is
-# the first way, and p is another way, then without this kludge we run
-# ghc -M -hisuf dyn_hi -osuf dyn_o -dep-suffix dyn -dep-suffix p
-# which means we get dependencies for .dyn_hi/.dyn_o and .p_dyn_hi/.p_dyn_o
-# rather than .dyn_hi/.dyn_o and .p_hi/.p_o.
-# With the kludge we also get .hi/.o dependencies that we don't need, but
-# they don't do any harm.
-# We also specify -static, as otherwise we end up with some dependencies
-# on .dyn_dyn_hi files
-$1_$2_MKDEPENDHS_FLAGS += -static -hisuf hi -osuf o
ifneq "$$(NO_GENERATED_MAKEFILE_RULES)" "YES"