Commit e3b5f08d authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Put RTS's package configuration into inplace-pkg-config for consistency

parent e93f7a41
......@@ -22,10 +22,10 @@ registerPackage rs context@Context {..} = when (stage <= Stage1) $ do
-- This produces inplace-pkg-config. TODO: Add explicit tracking.
need [pkgDataFile context]
-- Post-process inplace-pkg-config. TODO: remove, see #113, #148.
-- Post-process inplace-pkg-config.
top <- topDirectory
let path = buildPath context
pkgConfig = path -/- "inplace-pkg-config"
pkgConfig = inplacePkgConfig context
oldPath = top -/- path </> "build"
fixFile pkgConfig $ unlines . map (replace oldPath path) . lines
......
......@@ -13,10 +13,9 @@ initArgs = initPredicate ? mconcat [ arg "init", arg =<< getOutput ]
updateArgs :: Args
updateArgs = notM initPredicate ? do
path <- getBuildPath
verbosity <- lift $ getVerbosity
mconcat [ arg "update"
, arg "--force"
, verbosity < Chatty ? arg "-v0"
, bootPackageDatabaseArgs
, arg $ path -/- "inplace-pkg-config" ]
, arg . inplacePkgConfig =<< getContext ]
......@@ -18,7 +18,7 @@ rtsConfIn :: FilePath
rtsConfIn = pkgPath rts -/- "package.conf.in"
rtsConf :: FilePath
rtsConf = buildPath rtsContext -/- "package.conf.inplace"
rtsConf = inplacePkgConfig rtsContext
rtsLibffiLibraryName :: Action FilePath
rtsLibffiLibraryName = do
......@@ -96,10 +96,6 @@ rtsPackageArgs = package rts ? do
, builder Ghc ? arg "-Irts"
, builder (GhcPkg Stage1) ? mconcat
[ remove [path -/- "inplace-pkg-config"]
, arg rtsConf ]
, builder HsCpp ? append
[ "-DTOP=" ++ show top
, "-DFFI_INCLUDE_DIR=" ++ show ffiIncludeDir
......
......@@ -4,7 +4,7 @@ module Settings.Path (
gmpBuildInfoPath, generatedPath, libffiBuildPath, shakeFilesPath,
pkgConfFile, packageDbDirectory, packageDbStamp, bootPackageConstraints,
packageDependencies, objectPath, programInplacePath, programInplaceLibPath,
installPath, autogenPath
installPath, autogenPath, inplacePkgConfig
) where
import Base
......@@ -60,6 +60,10 @@ autogenPath context@Context {..}
where
autogen dir = buildPath context -/- dir -/- "autogen"
-- | Path to inplace package configuration of a given 'Context'.
inplacePkgConfig :: Context -> FilePath
inplacePkgConfig context = buildPath context -/- "inplace-pkg-config"
-- | Path to the @package-data.mk@ of a given 'Context'.
pkgDataFile :: Context -> FilePath
pkgDataFile context = buildPath context -/- "package-data.mk"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment