[commit: ghc] wip/nfs-locking: Postprocess inplace-pkg-config files. (f84ee22)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:06:13 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/f84ee22ff9c333ccd1625f06931e339b23e6e7cf/ghc
>---------------------------------------------------------------
commit f84ee22ff9c333ccd1625f06931e339b23e6e7cf
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sun Jan 10 14:24:58 2016 +0000
Postprocess inplace-pkg-config files.
See #113 and #148.
>---------------------------------------------------------------
f84ee22ff9c333ccd1625f06931e339b23e6e7cf
src/Rules/Data.hs | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/Rules/Data.hs b/src/Rules/Data.hs
index 9aeb7b3..4428b35 100644
--- a/src/Rules/Data.hs
+++ b/src/Rules/Data.hs
@@ -54,7 +54,17 @@ buildPackageData rs target @ (PartialTarget stage pkg) = do
-- ghc-pkg produces inplace-pkg-config when run on packages with
-- library components only
when (isLibrary pkg) .
- whenM (interpretPartial target registerPackage) .
+ whenM (interpretPartial target registerPackage) $ do
+
+ -- Post-process inplace-pkg-config. TODO: remove, see #113, #148
+ let fixPkgConf = unlines
+ . map (replace oldPath (targetPath stage pkg)
+ . replace (replaceSeparators '\\' $ oldPath)
+ (targetPath stage pkg) )
+ . lines
+
+ fixFile (oldPath -/- "inplace-pkg-config") fixPkgConf
+
buildWithResources [(resGhcPkg rs, 1)] $
fullTarget target (GhcPkg stage) [cabalFile] []
More information about the ghc-commits
mailing list