Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
5fccc856
Commit
5fccc856
authored
Sep 06, 2007
by
judah.jacobson@gmail.com
Browse files
Make installPackage install settings from the [package].buildinfo file.
M ./libraries/installPackage.hs -1 +14
parent
1f86a261
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/installPackage.hs
View file @
5fccc856
...
...
@@ -5,6 +5,7 @@ import Distribution.Simple.Configure
import
Distribution.Simple.LocalBuildInfo
import
Distribution.Simple.Program
import
Distribution.Simple.Setup
import
Distribution.Simple.Utils
import
Distribution.Verbosity
import
System.Environment
...
...
@@ -41,7 +42,7 @@ doit destdir pref idatadir idocdir ghcpkg ghcpkgconf verbosity =
regGenScript
=
False
,
regInPlace
=
False
}
lbi
<-
get
PersistBuildConfig
lbi
<-
get
Config
verbosity
let
pd
=
localPkgDescr
lbi
i
=
installDirTemplates
lbi
-- XXX This is an almighty hack, shadowing the base
...
...
@@ -84,3 +85,15 @@ doit destdir pref idatadir idocdir ghcpkg ghcpkgconf verbosity =
(
regHook
simpleUserHooks
)
pd_reg
lbi_reg
userHooks
registerFlags
return
()
-- Get the build info, merging the setup-config and buildinfo files.
getConfig
::
Verbosity
->
IO
LocalBuildInfo
getConfig
verbosity
=
do
lbi
<-
getPersistBuildConfig
maybe_infoFile
<-
defaultHookedPackageDesc
case
maybe_infoFile
of
Nothing
->
return
lbi
Just
infoFile
->
do
hbi
<-
readHookedBuildInfo
verbosity
infoFile
return
lbi
{
localPkgDescr
=
updatePackageDescription
hbi
(
localPkgDescr
lbi
)}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment