summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2015-05-28 17:11:12 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2015-06-20 14:59:05 -0700
commit85d539754ac07286ef5fed714ad42451bd5a1d28 (patch)
tree4228b2d58ee5541e4f79c515354fecbbddc23d86 /utils
parentf2ffdc6e023e3fb075842de382f3ed9aeb902647 (diff)
downloadhaskell-85d539754ac07286ef5fed714ad42451bd5a1d28.tar.gz
Make GHC install libraries to e.g. xhtml-3000.2.1-0ACfOp3hebWD9jGWE4v4Gh.
Summary: Previously, we'd install them to something like xhtml_0ACfOp3hebWD9jGWE4v4G which was fairly ugly; this commit changes the default install path to contain the full package name and version, as well as the package key. Needs a Cabal submodule update for the commit for install paths support "Add libname install-dirs variable, use it by default. Fixes #2437". It also contains some miscellaneous fixes for Cabal HEAD. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin Subscribers: bgamari, thomie Trac Issues: #10479 Differential Revision: https://phabricator.haskell.org/D922
Diffstat (limited to 'utils')
-rw-r--r--utils/ghc-cabal/Main.hs10
-rw-r--r--utils/ghc-pkg/Main.hs2
2 files changed, 10 insertions, 2 deletions
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index 4ae85ecbd0..3c049fedf1 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -118,6 +118,7 @@ doCheck directory
[] -> return ()
errs -> mapM_ print errs >> exitWith (ExitFailure 1)
where isFailure (PackageDistSuspicious {}) = False
+ isFailure (PackageDistSuspiciousWarn {}) = False
isFailure _ = True
runHsColour :: FilePath -> FilePath -> [String] -> IO ()
@@ -256,7 +257,7 @@ updateInstallDirTemplates relocatableBuild myPrefix myLibdir myDocdir idts
if relocatableBuild
then "$topdir"
else myLibdir,
- libsubdir = toPathTemplate "$pkgkey",
+ libsubdir = toPathTemplate "$libname",
docdir = toPathTemplate $
if relocatableBuild
then "$topdir/../doc/html/libraries/$pkgid"
@@ -414,6 +415,12 @@ generate directory distdir dll0Modules config_args
| packageKeySupported comp
= map (display . Installed.packageKey) dep_pkgs
| otherwise = transitiveDeps
+ transitiveDepLibNames
+ | packageKeySupported comp
+ = map (\p -> packageKeyLibraryName
+ (Installed.sourcePackageId p)
+ (Installed.packageKey p)) dep_pkgs
+ | otherwise = transitiveDeps
transitiveDepNames = map (display . packageName) transitive_dep_ids
libraryDirs = forDeps Installed.libraryDirs
@@ -444,6 +451,7 @@ generate directory distdir dll0Modules config_args
variablePrefix ++ "_DEP_NAMES = " ++ unwords depNames,
variablePrefix ++ "_TRANSITIVE_DEPS = " ++ unwords transitiveDeps,
variablePrefix ++ "_TRANSITIVE_DEP_KEYS = " ++ unwords transitiveDepKeys,
+ variablePrefix ++ "_TRANSITIVE_DEP_LIB_NAMES = " ++ unwords transitiveDepLibNames,
variablePrefix ++ "_TRANSITIVE_DEP_NAMES = " ++ unwords transitiveDepNames,
variablePrefix ++ "_INCLUDE_DIRS = " ++ unwords (includeDirs bi),
variablePrefix ++ "_INCLUDES = " ++ unwords (includes bi),
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index f3017a2dc4..a83720b825 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -19,7 +19,7 @@ import Distribution.ModuleName (ModuleName)
import Distribution.InstalledPackageInfo as Cabal
import Distribution.Compat.ReadP hiding (get)
import Distribution.ParseUtils
-import Distribution.Package hiding (depends, installedPackageId)
+import Distribution.Package hiding (installedPackageId)
import Distribution.Text
import Distribution.Version
import Distribution.Simple.Utils (fromUTF8, toUTF8)