Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
4f93b63e
Commit
4f93b63e
authored
Feb 05, 2017
by
Daniel Gröber (dxld)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add $libexecsubdir InstallDirs variable
parent
1340c21e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
7 deletions
+33
-7
Cabal/Distribution/Simple/InstallDirs.hs
Cabal/Distribution/Simple/InstallDirs.hs
+6
-0
Cabal/Distribution/Simple/Setup.hs
Cabal/Distribution/Simple/Setup.hs
+5
-0
Cabal/doc/installing-packages.rst
Cabal/doc/installing-packages.rst
+8
-0
cabal-install/Distribution/Client/ProjectPlanning.hs
cabal-install/Distribution/Client/ProjectPlanning.hs
+13
-6
cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs
...tall/tests/UnitTests/Distribution/Client/ProjectConfig.hs
+1
-1
No files found.
Cabal/Distribution/Simple/InstallDirs.hs
View file @
4f93b63e
...
...
@@ -85,6 +85,7 @@ data InstallDirs dir = InstallDirs {
dynlibdir
::
dir
,
flibdir
::
dir
,
-- ^ foreign libraries
libexecdir
::
dir
,
libexecsubdir
::
dir
,
includedir
::
dir
,
datadir
::
dir
,
datasubdir
::
dir
,
...
...
@@ -116,6 +117,7 @@ combineInstallDirs combine a b = InstallDirs {
dynlibdir
=
dynlibdir
a
`
combine
`
dynlibdir
b
,
flibdir
=
flibdir
a
`
combine
`
flibdir
b
,
libexecdir
=
libexecdir
a
`
combine
`
libexecdir
b
,
libexecsubdir
=
libexecsubdir
a
`
combine
`
libexecsubdir
b
,
includedir
=
includedir
a
`
combine
`
includedir
b
,
datadir
=
datadir
a
`
combine
`
datadir
b
,
datasubdir
=
datasubdir
a
`
combine
`
datasubdir
b
,
...
...
@@ -129,8 +131,10 @@ combineInstallDirs combine a b = InstallDirs {
appendSubdirs
::
(
a
->
a
->
a
)
->
InstallDirs
a
->
InstallDirs
a
appendSubdirs
append
dirs
=
dirs
{
libdir
=
libdir
dirs
`
append
`
libsubdir
dirs
,
libexecdir
=
libexecdir
dirs
`
append
`
libexecsubdir
dirs
,
datadir
=
datadir
dirs
`
append
`
datasubdir
dirs
,
libsubdir
=
error
"internal error InstallDirs.libsubdir"
,
libexecsubdir
=
error
"internal error InstallDirs.libexecsubdir"
,
datasubdir
=
error
"internal error InstallDirs.datasubdir"
}
...
...
@@ -200,6 +204,7 @@ defaultInstallDirs' False comp userInstall _hasLibs = do
LHC
->
"$compiler"
UHC
->
"$pkgid"
_other
->
"$abi"
,
libexecsubdir
=
"$abi"
</>
"$pkgid"
,
flibdir
=
"$libdir"
,
libexecdir
=
case
buildOS
of
Windows
->
"$prefix"
</>
"$libname"
...
...
@@ -244,6 +249,7 @@ substituteInstallDirTemplates env dirs = dirs'
dynlibdir
=
subst
dynlibdir
[
prefixVar
,
bindirVar
,
libdirVar
],
flibdir
=
subst
flibdir
[
prefixVar
,
bindirVar
,
libdirVar
],
libexecdir
=
subst
libexecdir
prefixBinLibVars
,
libexecsubdir
=
subst
libexecsubdir
[]
,
includedir
=
subst
includedir
prefixBinLibVars
,
datadir
=
subst
datadir
prefixBinLibVars
,
datasubdir
=
subst
datasubdir
[]
,
...
...
Cabal/Distribution/Simple/Setup.hs
View file @
4f93b63e
...
...
@@ -927,6 +927,11 @@ installDirsOptions =
libexecdir
(
\
v
flags
->
flags
{
libexecdir
=
v
})
installDirArg
,
option
""
[
"libexecsubdir"
]
"subdirectory of libexecdir in which private executables are installed"
libexecsubdir
(
\
v
flags
->
flags
{
libexecsubdir
=
v
})
installDirArg
,
option
""
[
"datadir"
]
"installation directory for read-only data"
datadir
(
\
v
flags
->
flags
{
datadir
=
v
})
...
...
Cabal/doc/installing-packages.rst
View file @
4f93b63e
...
...
@@ -656,6 +656,14 @@ path options:
``$
pkg
``,
``$
version
``,
``$
compiler
``,
``$
os
``,
``$
arch
``,
``$
abi
``,
``$
abitag
``
..
option
::
--
libexecsubdir
=
dir
A
subdirectory
of
*
libexecdir
*
in
which
private
executables
are
installed
.
*
dir
*
may
contain
the
following
path
variables
:
``$
pkgid
``,
``$
pkg
``,
``$
version
``,
``$
compiler
``,
``$
os
``,
``$
arch
``,
``$
abi
``,
``$
abitag
``
..
option
::
--
datasubdir
=
dir
A
subdirectory
of
*
datadir
*
in
which
data
files
are
actually
...
...
cabal-install/Distribution/Client/ProjectPlanning.hs
View file @
4f93b63e
...
...
@@ -1420,9 +1420,12 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
platform
defaultInstallDirs
)
{
InstallDirs
.
libsubdir
=
""
,
-- absoluteInstallDirs sets these as
InstallDirs
.
datasubdir
=
""
-- 'undefined' but we have to use
}
-- them as "Setup.hs configure" args
-- absoluteInstallDirs sets these as 'undefined' but we have
-- to use them as "Setup.hs configure" args
InstallDirs
.
libsubdir
=
""
,
InstallDirs
.
libexecsubdir
=
""
,
InstallDirs
.
datasubdir
=
""
}
|
otherwise
-- use special simplified install dirs
...
...
@@ -1567,9 +1570,12 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
platform
defaultInstallDirs
)
{
InstallDirs
.
libsubdir
=
""
,
-- absoluteInstallDirs sets these as
InstallDirs
.
datasubdir
=
""
-- 'undefined' but we have to use
}
-- them as "Setup.hs configure" args
-- absoluteInstallDirs sets these as 'undefined' but we have to
-- use them as "Setup.hs configure" args
InstallDirs
.
libsubdir
=
""
,
InstallDirs
.
libexecsubdir
=
""
,
InstallDirs
.
datasubdir
=
""
}
|
otherwise
-- use special simplified install dirs
...
...
@@ -2930,6 +2936,7 @@ storePackageInstallDirs StoreDirLayout{storePackageDirectory}
dynlibdir
=
libdir
flibdir
=
libdir
libexecdir
=
prefix
</>
"libexec"
libexecsubdir
=
""
includedir
=
libdir
</>
"include"
datadir
=
prefix
</>
"share"
datasubdir
=
""
...
...
cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs
View file @
4f93b63e
...
...
@@ -550,7 +550,7 @@ instance Arbitrary a => Arbitrary (InstallDirs a) where
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
-- 4
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
-- 8
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
-- 12
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
-- 1
5
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
-- 1
6
instance
Arbitrary
PackageDB
where
arbitrary
=
oneof
[
pure
GlobalPackageDB
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment