Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
2cf65bf4
Commit
2cf65bf4
authored
9 years ago
by
Edward Z. Yang
Browse files
Options
Downloads
Patches
Plain Diff
Add libname install-dirs variable, use it by default. Fixes #2437.
Signed-off-by:
Edward Z. Yang
<
ezyang@cs.stanford.edu
>
parent
72440fde
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Cabal/Distribution/Simple/InstallDirs.hs
+8
-4
8 additions, 4 deletions
Cabal/Distribution/Simple/InstallDirs.hs
with
8 additions
and
4 deletions
Cabal/Distribution/Simple/InstallDirs.hs
+
8
−
4
View file @
2cf65bf4
...
...
@@ -57,7 +57,7 @@ import System.FilePath ((</>), isPathSeparator, pathSeparator)
import
System.FilePath
(
dropDrive
)
import
Distribution.Package
(
PackageIdentifier
,
PackageKey
,
packageName
,
packageVersion
)
(
PackageIdentifier
,
PackageKey
,
packageName
,
packageVersion
,
packageKeyLibraryName
)
import
Distribution.System
(
OS
(
..
),
buildOS
,
Platform
(
..
)
)
import
Distribution.Compiler
...
...
@@ -183,7 +183,7 @@ appendSubdirs append dirs = dirs {
-- users to be able to configure @--libdir=\/usr\/lib64@ for example but
-- because by default we want to support installing multiple versions of
-- packages and building the same package for multiple compilers we append the
-- libsubdir to get: @\/usr\/lib64\/$
pkgkey
\/$compiler@.
-- libsubdir to get: @\/usr\/lib64\/$
libname
\/$compiler@.
--
-- An additional complication is the need to support relocatable packages on
-- systems which support such things, like Windows.
...
...
@@ -216,10 +216,10 @@ defaultInstallDirs comp userInstall _hasLibs = do
JHC
->
"$compiler"
LHC
->
"$compiler"
UHC
->
"$pkgid"
_other
->
"$abi"
</>
"$
pkgkey
"
,
_other
->
"$abi"
</>
"$
libname
"
,
dynlibdir
=
"$libdir"
,
libexecdir
=
case
buildOS
of
Windows
->
"$prefix"
</>
"$
pkgkey
"
Windows
->
"$prefix"
</>
"$
libname
"
_other
->
"$prefix"
</>
"libexec"
,
includedir
=
"$libdir"
</>
"$libsubdir"
</>
"include"
,
datadir
=
case
buildOS
of
...
...
@@ -373,6 +373,7 @@ data PathTemplateVariable =
|
PkgVerVar
-- ^ The @$version@ package version path variable
|
PkgIdVar
-- ^ The @$pkgid@ package Id path variable, eg @foo-1.0@
|
PkgKeyVar
-- ^ The @$pkgkey@ package key path variable
|
LibNameVar
-- ^ The @$libname@ expanded package key path variable
|
CompilerVar
-- ^ The compiler name and version, eg @ghc-6.6.1@
|
OSVar
-- ^ The operating system name, eg @windows@ or @linux@
|
ArchVar
-- ^ The CPU architecture name, eg @i386@ or @x86_64@
...
...
@@ -430,6 +431,7 @@ packageTemplateEnv pkgId pkg_key =
[(
PkgNameVar
,
PathTemplate
[
Ordinary
$
display
(
packageName
pkgId
)])
,(
PkgVerVar
,
PathTemplate
[
Ordinary
$
display
(
packageVersion
pkgId
)])
,(
PkgKeyVar
,
PathTemplate
[
Ordinary
$
display
pkg_key
])
,(
LibNameVar
,
PathTemplate
[
Ordinary
$
packageKeyLibraryName
pkgId
pkg_key
])
,(
PkgIdVar
,
PathTemplate
[
Ordinary
$
display
pkgId
])
]
...
...
@@ -479,6 +481,7 @@ installDirsTemplateEnv dirs =
instance
Show
PathTemplateVariable
where
show
PrefixVar
=
"prefix"
show
PkgKeyVar
=
"pkgkey"
show
LibNameVar
=
"libname"
show
BindirVar
=
"bindir"
show
LibdirVar
=
"libdir"
show
LibsubdirVar
=
"libsubdir"
...
...
@@ -516,6 +519,7 @@ instance Read PathTemplateVariable where
,(
"htmldir"
,
HtmldirVar
)
,(
"pkgid"
,
PkgIdVar
)
,(
"pkgkey"
,
PkgKeyVar
)
,(
"libname"
,
LibNameVar
)
,(
"pkg"
,
PkgNameVar
)
,(
"version"
,
PkgVerVar
)
,(
"compiler"
,
CompilerVar
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment