Commit 7c45e18e authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Optimise buildPackageDependencies rule.

parent 4fcb4718
......@@ -14,10 +14,13 @@ buildPackageDependencies (Package name path _) (stage, dist, settings) =
<> packageArgs stage pkgData
<> includeArgs path dist
<> productArgs ["-odir", "-stubdir"] buildDir
<> arg ["-dep-makefile", out]
<> arg ["-dep-makefile", out <.> "new"]
<> productArgs "-dep-suffix" (map wayPrefix <$> ways settings)
<> arg (pkgHsSources path dist)
-- TODO: Check that skipping all _HC_OPTS is safe.
-- <> arg SrcHcOpts
-- TODO: i) is this needed? ii) shall we run GHC -M multiple times?
-- <> wayHcOpts vanilla
-- Avoid rebuilding dependecies of out if it hasn't changed:
copyFileChanged (out <.> "new") out
removeFilesAfter "." [out <.> "new"]
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