diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2013-02-27 09:57:09 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2013-02-27 09:57:09 +0000 |
commit | 47d226544fc3fb11d024740a162f8ae4e1d044c9 (patch) | |
tree | 8a024b97de71216f6b3606d3cda7bf16ae1f98a6 /rules/build-prog.mk | |
parent | 7b5e514d85c086be8dc6d938b526c97b6ced56eb (diff) | |
parent | 0ee31659afe7a6819f9eb5e233f98e5592f1b439 (diff) | |
download | haskell-tc-arrows.tar.gz |
Merge remote-tracking branch 'origin/master' into tc-arrowstc-arrows
Diffstat (limited to 'rules/build-prog.mk')
-rw-r--r-- | rules/build-prog.mk | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/rules/build-prog.mk b/rules/build-prog.mk index 0419c3b4ab..3cea0e4839 100644 --- a/rules/build-prog.mk +++ b/rules/build-prog.mk @@ -135,11 +135,14 @@ endif $1_$2_WAYS = $$($1_$2_PROGRAM_WAY) +$1_$2_DYNAMIC_TOO = NO + $(call hs-sources,$1,$2) $(call c-sources,$1,$2) # --- IMPLICIT RULES +$(call distdir-opts,$1,$2,,$3) $(call distdir-way-opts,$1,$2,$$($1_$2_PROGRAM_WAY),$3) ifeq "$3" "0" @@ -154,15 +157,14 @@ $(call c-suffix-rules,$1,$2,$$($1_$2_PROGRAM_WAY),NO) endif endif -$(call hs-suffix-rules,$1,$2,$$($1_$2_PROGRAM_WAY)) +$$(foreach dir,$$($1_$2_HS_SRC_DIRS),\ + $$(eval $$(call hs-suffix-rules-srcdir,$1,$2,$$(dir)))) +$(call hs-suffix-way-rules,$1,$2,$$($1_$2_PROGRAM_WAY)) $(call c-objs,$1,$2,$$($1_$2_PROGRAM_WAY)) $(call hs-objs,$1,$2,$$($1_$2_PROGRAM_WAY)) $1_$2_LINK_WITH_GCC = NO -ifeq "$$(BootingFromHc)" "YES" -$1_$2_LINK_WITH_GCC = YES -endif ifeq "$$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS)" "" # We don't want to link the GHC RTS into C-only programs. There's no @@ -186,13 +188,13 @@ ifneq "$$(BINDIST)" "YES" # The quadrupled $'s here are because the _<way>_LIB variables aren't # necessarily set when this part of the makefile is read $1/$2/build/tmp/$$($1_$2_PROG) : \ - $$(foreach dep,$$($1_$2_DEP_NAMES),\ - $$(if $$(filter ghc,$$(dep)),\ + $$(foreach dep,$$($1_$2_DEPS),\ + $$(if $$(filter ghc%,$$(dep)),\ $(if $(filter 0,$3),$$(compiler_stage1_PROGRAM_DEP_LIB),\ $(if $(filter 1,$3),$$(compiler_stage2_PROGRAM_DEP_LIB),\ $(if $(filter 2,$3),$$(compiler_stage2_PROGRAM_DEP_LIB),\ $$(error Bad build stage)))),\ - $$$$(libraries/$$(dep)_dist-$(if $(filter 0,$3),boot,install)_PROGRAM_DEP_LIB))) + $$$$($$(dep)_dist-$(if $(filter 0,$3),boot,install)_PROGRAM_DEP_LIB))) ifeq "$$($1_$2_LINK_WITH_GCC)" "NO" $1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/. |