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
6d46b39a
Commit
6d46b39a
authored
Jul 03, 2017
by
Zhen Zhang
Committed by
Andrey Mokhov
Jul 02, 2017
Browse files
Fix setup-config dependency (
#334
)
parent
edd539fc
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/Rules.hs
View file @
6d46b39a
...
...
@@ -39,6 +39,8 @@ buildLib stage pkg = do
when
(
pkg
`
elem
`
activePackages
)
$
if
isLibrary
pkg
then
do
-- build a library
when
(
nonCabalContext
context
)
$
need
[
pkgSetupConfigFile
context
]
ways
<-
interpretInContext
context
getLibraryWays
libs
<-
mapM
(
pkgLibraryFile
.
Context
stage
pkg
)
ways
docs
<-
interpretInContext
context
$
buildHaddock
flavour
...
...
src/Rules/Data.hs
View file @
6d46b39a
...
...
@@ -20,8 +20,9 @@ buildPackageData context@Context {..} = do
cabalFile
=
pkgCabalFile
package
configure
=
pkgPath
package
-/-
"configure"
dataFile
=
pkgDataFile
context
setupConfigFile
=
pkgSetupConfigFile
context
dataFile
%>
\
mk
->
do
[
dataFile
,
setupConfigFile
]
&
%>
\
(
mk
:
setupConfig
:
_
)
->
do
-- Make sure all generated dependencies are in place before proceeding.
orderOnly
=<<
interpretInContext
context
generatedDependencies
...
...
@@ -32,7 +33,7 @@ buildPackageData context@Context {..} = do
need
=<<
mapM
pkgConfFile
=<<
contextDependencies
context
need
[
cabalFile
]
build
$
Target
context
GhcCabal
[
cabalFile
]
[
mk
]
build
$
Target
context
GhcCabal
[
cabalFile
]
[
mk
,
setupConfig
]
postProcessPackageData
context
mk
pkgInplaceConfig
context
%>
\
conf
->
do
...
...
@@ -107,6 +108,7 @@ packageCmmSources pkg
-- For example, @libraries/deepseq/dist-install_VERSION = 1.4.0.0@
-- is replaced by @VERSION = 1.4.0.0@.
-- Reason: Shake's built-in makefile parser doesn't recognise slashes
-- TODO (izgzhen): should fix DEP_LIB_REL_DIRS_SEARCHPATH
postProcessPackageData
::
Context
->
FilePath
->
Action
()
postProcessPackageData
context
@
Context
{
..
}
file
=
do
top
<-
topDirectory
...
...
src/Rules/Install.hs
View file @
6d46b39a
...
...
@@ -18,7 +18,7 @@ import Oracles.Config.Setting
import
Oracles.PackageData
import
Oracles.Path
import
qualified
System.Directory
.Extra
as
IO
import
qualified
System.Directory
as
IO
{- | Install the built binaries etc. to the @destDir ++ prefix@.
...
...
@@ -133,6 +133,7 @@ withLatestBuildStage pkg m = do
installPackageConf
::
Action
()
installPackageConf
=
do
let
context
=
vanillaContext
Stage0
rts
liftIO
$
IO
.
createDirectoryIfMissing
True
(
takeDirectory
pkgConfInstallPath
)
build
$
Target
context
HsCpp
[
pkgPath
rts
-/-
"package.conf.in"
]
[
pkgConfInstallPath
<.>
"raw"
]
Stdout
out
<-
cmd
(
"grep"
::
String
)
[
"-v"
,
"^#pragma GCC"
...
...
src/Settings/Path.hs
View file @
6d46b39a
...
...
@@ -5,7 +5,8 @@ module Settings.Path (
rtsContext
,
rtsBuildPath
,
rtsConfIn
,
shakeFilesPath
,
inplacePackageDbDirectory
,
pkgConfFile
,
packageDbStamp
,
bootPackageConstraints
,
packageDependencies
,
objectPath
,
inplaceBinPath
,
inplaceLibBinPath
,
inplaceLibPath
,
installPath
,
autogenPath
,
pkgInplaceConfig
,
ghcSplitPath
,
stripCmdPath
installPath
,
autogenPath
,
pkgInplaceConfig
,
ghcSplitPath
,
stripCmdPath
,
pkgSetupConfigFile
)
where
import
Base
...
...
@@ -74,6 +75,11 @@ pkgInplaceConfig context = buildPath context -/- "inplace-pkg-config"
pkgDataFile
::
Context
->
FilePath
pkgDataFile
context
=
buildPath
context
-/-
"package-data.mk"
-- | Path to the @setup-config@ of a given 'Context'.
pkgSetupConfigFile
::
Context
->
FilePath
pkgSetupConfigFile
context
=
buildPath
context
-/-
"setup-config"
-- | Path to the haddock file of a given 'Context', e.g.:
-- "_build/stage1/libraries/array/doc/html/array/array.haddock".
pkgHaddockFile
::
Context
->
FilePath
...
...
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