Commit efb59728 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Use terseRun and new configuration options.

parent 30138cb1
......@@ -43,7 +43,7 @@ buildPackageCompile (Package name path _) (stage, dist, settings) =
let deps = concat $ snd $ unzip $ filter ((== out) . fst) depContents
srcs = filter ("//*hs" ?==) deps -- TODO: handle *.c sources
need deps
run (Ghc stage) $ suffixArgs way
terseRun (Ghc stage) $ suffixArgs way
<> wayHcArgs way
<> arg SrcHcOpts
<> packageArgs stage pkgData
......@@ -51,6 +51,6 @@ buildPackageCompile (Package name path _) (stage, dist, settings) =
-- TODO: now we have both -O and -O2
<> arg ["-Wall", "-XHaskell2010", "-O2"]
<> productArgs ["-odir", "-hidir", "-stubdir"] buildDir
<> arg "-split-objs"
<> when (splitObjects stage) (arg "-split-objs")
<> arg ("-c":srcs)
<> arg ["-o", out]
......@@ -93,6 +93,6 @@ buildPackageData (Package name path _) (stage, dist, settings) =
need ["shake/src/Package/Data.hs"]
need [path </> name <.> "cabal"]
when (doesFileExist $ configure <.> "ac") $ need [configure]
run GhcCabal cabalArgs
when (registerPackage settings) $ run (GhcPkg stage) ghcPkgArgs
terseRun GhcCabal cabalArgs
when (registerPackage settings) $ terseRun (GhcPkg stage) ghcPkgArgs
postProcessPackageData $ pathDist </> "package-data.mk"
......@@ -10,13 +10,13 @@ buildPackageDependencies (Package name path _) (stage, dist, settings) =
in
(buildDir </> name <.> "m") %> \out -> do
need ["shake/src/Package/Dependencies.hs"]
run (Ghc stage) $ arg "-M"
terseRun (Ghc stage) $ arg "-M"
<> packageArgs stage pkgData
<> includeArgs path dist
<> productArgs ["-odir", "-stubdir"] buildDir
<> arg ["-dep-makefile", out]
<> productArgs "-dep-suffix" (map suffix <$> ways settings)
<> srcArgs path pkgData
<> 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?
......
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