[commit: ghc] wip/nfs-locking: Clean up rules related to dependency lists. (7d42fda)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:54:04 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/7d42fdac5a5574825124b250e3db0287cab8c417/ghc
>---------------------------------------------------------------
commit 7d42fdac5a5574825124b250e3db0287cab8c417
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sun Jan 18 12:45:23 2015 +0000
Clean up rules related to dependency lists.
>---------------------------------------------------------------
7d42fdac5a5574825124b250e3db0287cab8c417
src/Package/Compile.hs | 2 +-
src/Package/Dependencies.hs | 14 ++++++--------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/src/Package/Compile.hs b/src/Package/Compile.hs
index 0cdb62c..1155117 100644
--- a/src/Package/Compile.hs
+++ b/src/Package/Compile.hs
@@ -48,7 +48,7 @@ buildRule pkg @ (Package name path _) todo @ (stage, dist, _) =
let oPattern = "*." ++ osuf way
let hiPattern = "*." ++ hisuf way
[buildDir <//> oPattern, buildDir <//> hiPattern] |%> \out -> do
- need [argListPath argListDir pkg stage, hDepFile, cDepFile]
+ need [argListPath argListDir pkg stage]
let obj = toStandard $ out -<.> osuf way
vanillaObj = toStandard $ out -<.> "o"
-- TODO: keep only vanilla dependencies in hDepFile
diff --git a/src/Package/Dependencies.hs b/src/Package/Dependencies.hs
index 08bb9e5..31c8d92 100644
--- a/src/Package/Dependencies.hs
+++ b/src/Package/Dependencies.hs
@@ -16,7 +16,7 @@ ghcArgs (Package name path _) (stage, dist, settings) =
, includeGhcArgs path dist
, concatArgs ["-optP"] $ CppArgs pathDist
, productArgs ["-odir", "-stubdir", "-hidir"] buildDir
- , args ["-dep-makefile", depFile <.> "new"]
+ , args ["-dep-makefile", depFile ]
, productArgs "-dep-suffix" $ map wayPrefix <$> ways settings
, args $ HsArgs pathDist
, args $ pkgHsSources path dist ]
@@ -60,19 +60,17 @@ buildRule :: Package -> TodoItem -> Rules ()
buildRule pkg @ (Package name path _) todo @ (stage, dist, settings) = do
let pathDist = path </> dist
buildDir = pathDist </> "build"
- hDepFile = buildDir </> "haskell.deps"
- cDepFile = buildDir </> "c.deps"
- hDepFile %> \out -> do
+ (buildDir </> "haskell.deps") %> \out -> do
need [argListPath argListDir pkg stage]
terseRun (Ghc stage) $ ghcArgs pkg todo
-- Avoid rebuilding dependecies of out if it hasn't changed:
-- Note: cannot use copyFileChanged as it depends on the source file
- deps <- liftIO $ readFile $ out <.> "new"
- writeFileChanged out deps
- liftIO $ removeFiles "." [out <.> "new"]
+ --deps <- liftIO $ readFile $ out <.> "new"
+ --writeFileChanged out deps
+ --liftIO $ removeFiles "." [out <.> "new"]
- cDepFile %> \out -> do
+ (buildDir </> "c.deps") %> \out -> do
need [argListPath argListDir pkg stage]
srcs <- args $ CSrcs pathDist
deps <- fmap concat $ forM srcs $ \src -> do
More information about the ghc-commits
mailing list