summaryrefslogtreecommitdiff
path: root/hadrian/src/Base.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian/src/Base.hs')
-rw-r--r--hadrian/src/Base.hs22
1 files changed, 14 insertions, 8 deletions
diff --git a/hadrian/src/Base.hs b/hadrian/src/Base.hs
index 77eec0a48a..7949fcf4b2 100644
--- a/hadrian/src/Base.hs
+++ b/hadrian/src/Base.hs
@@ -24,7 +24,8 @@ module Base (
-- * Paths
hadrianPath, configPath, configFile, sourcePath, shakeFilesDir,
generatedDir, generatedPath, stageBinPath, stageLibPath, templateHscPath,
- ghcDeps, haddockDeps, relativePackageDbPath, packageDbPath, packageDbStamp,
+ ghcDeps, includesDependencies, haddockDeps, relativePackageDbPath,
+ packageDbPath, packageDbStamp,
ghcSplitPath
) where
@@ -106,15 +107,20 @@ stageBinPath stage = buildRoot <&> (-/- stageString stage -/- "bin")
stageLibPath :: Stage -> Action FilePath
stageLibPath stage = buildRoot <&> (-/- stageString stage -/- "lib")
--- | Files the `ghc` binary depends on
+-- | Files the GHC binary depends on.
ghcDeps :: Stage -> Action [FilePath]
ghcDeps stage = mapM (\f -> stageLibPath stage <&> (-/- f))
- [ "ghc-usage.txt"
- , "ghci-usage.txt"
- , "llvm-targets"
- , "llvm-passes"
- , "platformConstants"
- , "settings" ]
+ [ "ghc-usage.txt"
+ , "ghci-usage.txt"
+ , "llvm-targets"
+ , "llvm-passes"
+ , "platformConstants"
+ , "settings" ]
+
+includesDependencies :: Action [FilePath]
+includesDependencies = do
+ path <- generatedPath
+ return $ (path -/-) <$> [ "ghcautoconf.h", "ghcplatform.h", "ghcversion.h" ]
-- | Files the `haddock` binary depends on
haddockDeps :: Stage -> Action [FilePath]