X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fbuild-package-way.mk;fp=rules%2Fbuild-package-way.mk;h=b4cd3bc590b345449774e487f4eb77b303374e6c;hb=5bde27949bdda22c9d5dac254a3c783eb0f6839f;hp=ed81d6d53267d6e7e2bdc15fcfeb4060cb360f3c;hpb=2a1db1613dfa6b7cb982daa98987aee2c4eb12b1;p=ghc-hetmet.git diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk index ed81d6d..b4cd3bc 100644 --- a/rules/build-package-way.mk +++ b/rules/build-package-way.mk @@ -51,6 +51,17 @@ endif $1_$2_$3_NON_HS_OBJS = $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $1_$2_$3_ALL_OBJS = $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_NON_HS_OBJS) +# The quadrupled $'s here are because the _v_LIB variables aren't +# necessarily set when this part of the makefile is read. +# These deps aren't technically necessary in themselves, but they +# turn the dependencies of programs on libraries into transitive +# dependencies. +ifeq "$4" "0" +$$($1_$2_$3_LIB) : $$(foreach dep,$$($1_$2_DEP_NAMES),$$$$(libraries/$$(dep)_dist-boot_v_LIB)) +else +$$($1_$2_$3_LIB) : $$(foreach dep,$$($1_$2_DEP_NAMES),$$$$(libraries/$$(dep)_dist-install_v_LIB)) +endif + ifeq "$3" "dyn" # Link a dynamic library