Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Commit

Permalink
Postprocess inplace-pkg-config files.
Browse files Browse the repository at this point in the history
See #113 and #148.
  • Loading branch information
snowleopard committed Jan 10, 2016
1 parent 1d18a74 commit f84ee22
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Rules/Data.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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] []

Expand Down

0 comments on commit f84ee22

Please sign in to comment.