summaryrefslogtreecommitdiff
path: root/rules/build-prog.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-01-17 17:30:10 +0000
committerIan Lynagh <igloo@earth.li>2011-01-17 17:30:10 +0000
commit19db37f32e957ddf0202439c8b8cd97470c58fec (patch)
tree11bd22757e88c251597d93196bb7a6f2436d1f63 /rules/build-prog.mk
parentff30c8f61ed7318563a4f9185815e80cf35e363d (diff)
downloadhaskell-19db37f32e957ddf0202439c8b8cd97470c58fec.tar.gz
Fix deps on the ghc package
The standard libraries/$depname scheme doesn't apply, so we need to handle it specially.
Diffstat (limited to 'rules/build-prog.mk')
-rw-r--r--rules/build-prog.mk13
1 files changed, 8 insertions, 5 deletions
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 99b24de5cd..b910e7834c 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -194,11 +194,14 @@ endif
# The quadrupled $'s here are because the _v_LIB variables aren't
# necessarily set when this part of the makefile is read
-ifeq "$3" "0"
-$1/$2/build/tmp/$$($1_$2_PROG) : $$(foreach dep,$$($1_$2_DEP_NAMES),$$$$(libraries/$$(dep)_dist-boot_v_LIB))
-else
-$1/$2/build/tmp/$$($1_$2_PROG) : $$(foreach dep,$$($1_$2_DEP_NAMES),$$$$(libraries/$$(dep)_dist-install_v_LIB))
-endif
+$1/$2/build/tmp/$$($1_$2_PROG) : \
+ $$(foreach dep,$$($1_$2_DEP_NAMES),\
+ $$(if $$(filter ghc,$$(dep)),\
+ $(if $(filter 0,$3),$$(compiler_stage1_v_LIB),\
+ $(if $(filter 1,$3),$$(compiler_stage2_v_LIB),\
+ $(if $(filter 2,$3),$$(compiler_stage2_v_LIB),\
+ $$(error Bad build stage)))),\
+ $$$$(libraries/$$(dep)_dist-$(if $(filter 0,$3),boot,install)_v_LIB)))
ifeq "$$($1_$2_LINK_WITH_GCC)" "NO"
$1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/.