summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-03-23 11:56:46 +0000
committerIan Lynagh <ian@well-typed.com>2013-03-23 13:32:38 +0000
commit9548ec53d31b478bd22a4dd9cbce1244db013b67 (patch)
treede1d6054fa25089e6e56ea66f9beeb60db3e2cb8 /rules
parent1c0af76b1819fbe22edd04445c1936336fab8ce0 (diff)
downloadhaskell-9548ec53d31b478bd22a4dd9cbce1244db013b67.tar.gz
Tweak the _HC_OPTS variables
We no longer pass -hisuf/-osuf flags to "ghc -M". Doing so didn't really make sense with the way the -dep-suffix flags now work.
Diffstat (limited to 'rules')
-rw-r--r--rules/build-dependencies.mk2
-rw-r--r--rules/distdir-way-opts.mk13
2 files changed, 9 insertions, 6 deletions
diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk
index 7bbb8c5f36..bb047f62f0 100644
--- a/rules/build-dependencies.mk
+++ b/rules/build-dependencies.mk
@@ -35,7 +35,7 @@ $$($1_$2_depfile_haskell) : $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS) $$($1_$2_HC
$$(call removeFiles,$$@.tmp)
ifneq "$$($1_$2_HS_SRCS)" ""
"$$($1_$2_HC_MK_DEPEND)" -M \
- $$(filter-out -split-objs, $$($1_$2_$$(firstword $$($1_$2_WAYS))_ALL_HC_OPTS)) \
+ $$($1_$2_$$(firstword $$($1_$2_WAYS))_MOST_DIR_HC_OPTS) \
$$($1_$2_MKDEPENDHS_FLAGS) \
$$($1_$2_HS_SRCS)
endif
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 17ac70c045..872e52741e 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -99,7 +99,6 @@ $1_$2_$3_MOST_HC_OPTS = \
$$(foreach opt,$$($1_$2_CPP_OPTS),-optP$$(opt)) \
$$(if $$($1_PACKAGE),-optP-include -optP$1/$2/build/autogen/cabal_macros.h) \
$$(foreach pkg,$$($1_$2_DEPS),-package $$(pkg)) \
- $$(if $$(findstring YES,$$($1_$2_SplitObjs)),$$(if $$(findstring dyn,$3),,-split-objs),) \
$$($1_$2_HC_OPTS) \
$$(CONF_HC_OPTS_STAGE$4) \
$$($1_$2_MORE_HC_OPTS) \
@@ -109,16 +108,20 @@ $1_$2_$3_MOST_HC_OPTS = \
$$(SRC_HC_WARNING_OPTS) \
$$(EXTRA_HC_OPTS)
+$1_$2_$3_MOST_DIR_HC_OPTS = \
+ $$($1_$2_$3_MOST_HC_OPTS) \
+ -odir $1/$2/build -hidir $1/$2/build -stubdir $1/$2/build
+
# NB. CONF_HC_OPTS_STAGE$4 has to be late enough to override $1_$2_HC_OPTS, so
# that -O0 is effective (see #5484)
# $1_$2_$3_ALL_HC_OPTS: this is all the options we will pass to GHC
# for a given ($1,$2,$3).
$1_$2_$3_ALL_HC_OPTS = \
- $$($1_$2_$3_MOST_HC_OPTS) \
- $$(if $$(findstring YES,$$($1_$2_DYNAMIC_TOO)),$$(if $$(findstring v,$3),-dynamic-too)) \
- -odir $1/$2/build -hidir $1/$2/build -stubdir $1/$2/build \
- -hisuf $$($3_hisuf) -osuf $$($3_osuf) -hcsuf $$($3_hcsuf)
+ -hisuf $$($3_hisuf) -osuf $$($3_osuf) -hcsuf $$($3_hcsuf) \
+ $$($1_$2_$3_MOST_DIR_HC_OPTS) \
+ $$(if $$(findstring YES,$$($1_$2_SplitObjs)),$$(if $$(findstring dyn,$3),,-split-objs),) \
+ $$(if $$(findstring YES,$$($1_$2_DYNAMIC_TOO)),$$(if $$(findstring v,$3),-dynamic-too))
ifeq "$3" "dyn"
ifneq "$4" "0"