Tweak the _HC_OPTS variables
authorIan Lynagh <ian@well-typed.com>
Sat, 23 Mar 2013 11:56:46 +0000 (11:56 +0000)
committerIan Lynagh <ian@well-typed.com>
Sat, 23 Mar 2013 13:32:38 +0000 (13:32 +0000)
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.

rules/build-dependencies.mk
rules/distdir-way-opts.mk

index 7bbb8c5..bb047f6 100644 (file)
@@ -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
index 17ac70c..872e527 100644 (file)
@@ -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"