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 /utils/ghc-cabal | |
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 'utils/ghc-cabal')
-rw-r--r-- | utils/ghc-cabal/Main.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs index 77caf5819e..ed57fb8105 100644 --- a/utils/ghc-cabal/Main.hs +++ b/utils/ghc-cabal/Main.hs @@ -402,11 +402,13 @@ generate directory distdir dll0Modules config_args . fst) . externalPackageDeps $ lbi - dep_keys + dep_ipids = map (display . Installed.installedPackageId) dep_direct + depLibNames | packageKeySupported comp - = map (display . Installed.packageKey) dep_direct + = map (\p -> packageKeyLibraryName + (Installed.sourcePackageId p) + (Installed.packageKey p)) dep_direct | otherwise = deps - dep_ipids = map (display . Installed.installedPackageId) dep_direct depNames = map (display . packageName) dep_ids transitive_dep_ids = map Installed.sourcePackageId dep_pkgs @@ -443,9 +445,9 @@ generate directory distdir dll0Modules config_args variablePrefix ++ "_SYNOPSIS =" ++ synopsis pd, variablePrefix ++ "_HS_SRC_DIRS = " ++ unwords (hsSourceDirs bi), variablePrefix ++ "_DEPS = " ++ unwords deps, - variablePrefix ++ "_DEP_KEYS = " ++ unwords dep_keys, variablePrefix ++ "_DEP_IPIDS = " ++ unwords dep_ipids, variablePrefix ++ "_DEP_NAMES = " ++ unwords depNames, + variablePrefix ++ "_DEP_LIB_NAMES = " ++ unwords depLibNames, variablePrefix ++ "_TRANSITIVE_DEPS = " ++ unwords transitiveDeps, variablePrefix ++ "_TRANSITIVE_DEP_LIB_NAMES = " ++ unwords transitiveDepLibNames, variablePrefix ++ "_TRANSITIVE_DEP_NAMES = " ++ unwords transitiveDepNames, |