Commit 2c219087 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Track gmpBuildInfoPath explicitly.

See #159.
parent aafa9add
......@@ -119,4 +119,6 @@ gmpRules = do
gmpLibraryInTreeH %> \_ -> need [gmpLibraryH]
gmpBase -/- "config.mk" %> \_ -> need [pkgDataFile Stage1 integerGmp]
-- This causes integerGmp package to be configured, hence creating the files
[gmpBase -/- "config.mk", gmpBuildInfoPath] &%> \_ ->
need [pkgDataFile Stage1 integerGmp]
......@@ -12,9 +12,6 @@ import Settings
import Settings.Builders.GhcCabal (bootPackageDbArgs)
import Settings.Builders.Common (cIncludeArgs)
buildInfoPath :: FilePath
buildInfoPath = pkgPath integerGmp -/- "integer-gmp.buildinfo"
-- TODO: add support for -dyno
-- $1/$2/build/%.$$($3_o-bootsuf) : $1/$4/%.hs-boot
-- $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@
......@@ -32,7 +29,7 @@ ghcBuilderArgs = stagedBuilder Ghc ? do
libs <- getPkgDataList DepExtraLibs
gmpLibs <- if stage > Stage0 && buildProg
then do -- TODO: get this data more gracefully
buildInfo <- lift $ readFileLines buildInfoPath
buildInfo <- lift $ readFileLines gmpBuildInfoPath
let extract s = case stripPrefix "extra-libraries: " s of
Nothing -> []
Just value -> words value
......
module Settings.Paths (
targetDirectory, targetPath, pkgDataFile, pkgHaddockFile, pkgLibraryFile,
pkgLibraryFile0, pkgGhciLibraryFile, gmpBuildPath, packageDbDirectory,
pkgConfFile
pkgLibraryFile0, pkgGhciLibraryFile, gmpBuildPath, gmpBuildInfoPath,
packageDbDirectory, pkgConfFile
) where
import Base
......@@ -51,6 +51,10 @@ pkgFile stage pkg prefix suffix = do
gmpBuildPath :: FilePath
gmpBuildPath = buildRootPath -/- "stage1/gmp"
-- We extract system gmp library name from this file
gmpBuildInfoPath :: FilePath
gmpBuildInfoPath = pkgPath integerGmp -/- "integer-gmp.buildinfo"
-- TODO: move to buildRootPath, see #113
-- StageN, N > 0, share the same packageDbDirectory
packageDbDirectory :: Stage -> FilePath
......
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