diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-06-20 16:32:56 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-06-23 10:59:10 -0700 |
commit | 73a6265e040fdbb2c9e75337663aa6879e20e233 (patch) | |
tree | fa43d2be5706fd8cb276aa6e4be999da12d8766d /rules | |
parent | c0847967caf51ea4ca88d0ffc25fe1bd99dcabed (diff) | |
download | haskell-73a6265e040fdbb2c9e75337663aa6879e20e233.tar.gz |
Make $1 in $1_$2_$3_FOO actually be directory.
Summary:
Previously, we used $1_$2_PACKAGE_KEY to parametrize $1. But the
documentation says that $1 should be the directory... and we're now
putting the libraries in $1_$2_LIB_NAME. So use /that/. This is just
alpha-renaming, so as long as we're consistent, there's no material
difference.)
I also fixed a bug of a package ID calculation which I missed first
time around, which was tickled by this change.
BTW, this means DEP_KEYS and TRANSITIVE_DEP_KEYS are unused, so
remove them from ghc-cabal.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin
Subscribers: thomie, bgamari
Differential Revision: https://phabricator.haskell.org/D1010
Diffstat (limited to 'rules')
-rw-r--r-- | rules/build-package-way.mk | 8 | ||||
-rw-r--r-- | rules/build-package.mk | 2 | ||||
-rw-r--r-- | rules/build-prog.mk | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk index cb8440d34c..c179159914 100644 --- a/rules/build-package-way.mk +++ b/rules/build-package-way.mk @@ -25,7 +25,7 @@ $(call hs-objs,$1,$2,$3) # the second is indexed by the package id, distdir and way $1_$2_$3_LIB_FILE = libHS$$($1_$2_LIB_NAME)$$($3_libsuf) $1_$2_$3_LIB = $1/$2/build/$$($1_$2_$3_LIB_FILE) -$$($1_$2_PACKAGE_KEY)_$2_$3_LIB = $$($1_$2_$3_LIB) +$$($1_$2_LIB_NAME)_$2_$3_LIB = $$($1_$2_$3_LIB) ifeq "$$(HostOS_CPP)" "mingw32" ifneq "$$($1_$2_dll0_HS_OBJS)" "" @@ -42,7 +42,7 @@ endif # Really we should use a consistent scheme for distdirs, but in the # meantime we work around it by defining ghc-<ver>_dist-install_way_LIB: ifeq "$$($1_PACKAGE) $2" "ghc stage2" -$$($1_$2_PACKAGE_KEY)_dist-install_$3_LIB = $$($1_$2_$3_LIB) +$$($1_$2_LIB_NAME)_dist-install_$3_LIB = $$($1_$2_$3_LIB) endif # All the .a/.so library file dependencies for this library. @@ -50,8 +50,8 @@ endif # The $(subst stage2,dist-install,..) is needed due to Note # [inconsistent distdirs]. # -# NB: Use DEP_KEYS, since DEPS only contains package IDs -$1_$2_$3_DEPS_LIBS=$$(foreach dep,$$($1_$2_DEP_KEYS),$$($$(dep)_$(subst stage2,dist-install,$2)_$3_LIB)) +# NB: Use DEP_LIB_NAMES for the /directory/ parameter. +$1_$2_$3_DEPS_LIBS=$$(foreach dep,$$($1_$2_DEP_LIB_NAMES),$$($$(dep)_$(subst stage2,dist-install,$2)_$3_LIB)) $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) diff --git a/rules/build-package.mk b/rules/build-package.mk index 34997ccc63..f05f230c10 100644 --- a/rules/build-package.mk +++ b/rules/build-package.mk @@ -133,7 +133,7 @@ $$(foreach way,$$($1_$2_WAYS),$$(eval \ # If dyn libs are not being built then $$($1_$2_dyn_LIB) will just # expand to the empty string, and be ignored. $1_$2_PROGRAM_DEP_LIB = $$($1_$2_v_LIB) $$($1_$2_dyn_LIB) -$$($1_PACKAGE)-$$($1_$2_VERSION)_$2_PROGRAM_DEP_LIB = $$($1_$2_PROGRAM_DEP_LIB) +$$($1_$2_LIB_NAME)_$2_PROGRAM_DEP_LIB = $$($1_$2_PROGRAM_DEP_LIB) # C and S files are possibly built the "dyn" way. ifeq "$$(BuildSharedLibs)" "YES" diff --git a/rules/build-prog.mk b/rules/build-prog.mk index eca3358e25..1029fdd3ea 100644 --- a/rules/build-prog.mk +++ b/rules/build-prog.mk @@ -189,7 +189,7 @@ 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) $1/$2/build/tmp/$$($1_$2_PROG).dll : \ - $$(foreach dep,$$($1_$2_DEPS),\ + $$(foreach dep,$$($1_$2_DEP_LIB_NAMES),\ $$(if $$(filter ghc%,$$(dep)),\ $(if $(filter 0,$3),$$(compiler_stage1_PROGRAM_DEP_LIB),\ $(if $(filter 1,$3),$$(compiler_stage2_PROGRAM_DEP_LIB),\ |