[commit: ghc] wip/nfs-locking: Fix untracked .hs-incl dependencies. (9b9f7d2)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:21:59 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/9b9f7d2fd05b4bb146d794bd9fd1e67ba8311cb2/ghc
>---------------------------------------------------------------
commit 9b9f7d2fd05b4bb146d794bd9fd1e67ba8311cb2
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Thu Sep 24 05:50:17 2015 +0100
Fix untracked .hs-incl dependencies.
>---------------------------------------------------------------
9b9f7d2fd05b4bb146d794bd9fd1e67ba8311cb2
src/Rules/Dependencies.hs | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/src/Rules/Dependencies.hs b/src/Rules/Dependencies.hs
index c9b5b89..8fd9ca8 100644
--- a/src/Rules/Dependencies.hs
+++ b/src/Rules/Dependencies.hs
@@ -1,6 +1,7 @@
module Rules.Dependencies (buildPackageDependencies) where
import Expression
+import GHC
import Oracles
import Rules.Actions
import Rules.Resources
@@ -30,4 +31,23 @@ buildPackageDependencies _ target @ (PartialTarget stage pkg) =
need $ hDepFile : cDepFiles -- need all for more parallelism
cDeps <- fmap concat $ mapM readFile' cDepFiles
hDeps <- readFile' hDepFile
- writeFileChanged file $ cDeps ++ hDeps
+ -- TODO: very ugly and fragile
+ let hsIncl hs incl = buildPath -/- hs <.> "o" ++ " : "
+ ++ buildPath -/- incl ++ "\n"
+ extraDeps = if pkg /= compiler then [] else
+ hsIncl "PrelNames" "primop-vector-uniques.hs-incl"
+ ++ hsIncl "PrimOp" "primop-data-decl.hs-incl"
+ ++ hsIncl "PrimOp" "primop-tag.hs-incl"
+ ++ hsIncl "PrimOp" "primop-list.hs-incl"
+ ++ hsIncl "PrimOp" "primop-strictness.hs-incl"
+ ++ hsIncl "PrimOp" "primop-fixity.hs-incl"
+ ++ hsIncl "PrimOp" "primop-primop-info.hs-incl"
+ ++ hsIncl "PrimOp" "primop-out-of-line.hs-incl"
+ ++ hsIncl "PrimOp" "primop-has-side-effects.hs-incl"
+ ++ hsIncl "PrimOp" "primop-can-fail.hs-incl"
+ ++ hsIncl "PrimOp" "primop-code-size.hs-incl"
+ ++ hsIncl "PrimOp" "primop-commutable.hs-incl"
+ ++ hsIncl "TysPrim" "primop-vector-tys-exports.hs-incl"
+ ++ hsIncl "TysPrim" "primop-vector-tycons.hs-incl"
+ ++ hsIncl "TysPrim" "primop-vector-tys.hs-incl"
+ writeFileChanged file $ cDeps ++ hDeps ++ extraDeps
More information about the ghc-commits
mailing list