[commit: ghc] wip/nfs-locking: Add toStandard to varios places. (5d2cf2c)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:22:20 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/5d2cf2c3163f37cb53d0217eae93582980e211de/ghc
>---------------------------------------------------------------
commit 5d2cf2c3163f37cb53d0217eae93582980e211de
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Tue Jan 13 06:34:24 2015 +0000
Add toStandard to varios places.
>---------------------------------------------------------------
5d2cf2c3163f37cb53d0217eae93582980e211de
src/Package/Base.hs | 11 ++++++-----
src/Package/Dependencies.hs | 8 ++++----
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/Package/Base.hs b/src/Package/Base.hs
index 9882900..f6c70ea 100644
--- a/src/Package/Base.hs
+++ b/src/Package/Base.hs
@@ -84,7 +84,8 @@ bootPkgConstraints = mempty
-- sed "s/[^0-9.]//g")"))
pathArgs :: ShowArgs a => String -> FilePath -> a -> Args
-pathArgs key path as = map (\a -> key ++ normaliseEx (path </> a)) <$> arg as
+pathArgs key path as =
+ map (\a -> key ++ toStandard (normaliseEx $ path </> a)) <$> arg as
packageArgs :: Stage -> FilePath -> Args
packageArgs stage pkgData = do
@@ -100,14 +101,14 @@ packageArgs stage pkgData = do
includeArgs :: FilePath -> FilePath -> Args
includeArgs path dist =
- let pkgData = path </> dist </> "package-data.mk"
- buildDir = path </> dist </> "build"
+ let pkgData = toStandard $ path </> dist </> "package-data.mk"
+ buildDir = toStandard $ path </> dist </> "build"
in arg "-i"
<> pathArgs "-i" path (SrcDirs pkgData)
- <> concatArgs ["-i", "-I"] [buildDir, buildDir </> "autogen"]
+ <> concatArgs ["-i", "-I"] [buildDir, toStandard $ buildDir </> "autogen"]
<> pathArgs "-I" path (IncludeDirs pkgData)
<> arg "-optP-include" -- TODO: Shall we also add -cpp?
- <> concatArgs "-optP" (buildDir </> "autogen/cabal_macros.h")
+ <> concatArgs "-optP" (toStandard $ buildDir </> "autogen/cabal_macros.h")
pkgHsSources :: FilePath -> FilePath -> Action [FilePath]
pkgHsSources path dist = do
diff --git a/src/Package/Dependencies.hs b/src/Package/Dependencies.hs
index 6339adb..63ed508 100644
--- a/src/Package/Dependencies.hs
+++ b/src/Package/Dependencies.hs
@@ -5,16 +5,16 @@ import Package.Base
buildPackageDependencies :: Package -> TodoItem -> Rules ()
buildPackageDependencies (Package name path _) (stage, dist, settings) =
- let buildDir = path </> dist </> "build"
- pkgData = path </> dist </> "package-data.mk"
+ let buildDir = toStandard $ path </> dist </> "build"
+ pkgData = toStandard $ path </> dist </> "package-data.mk"
in
(buildDir </> name <.> "m") %> \out -> do
need ["shake/src/Package/Dependencies.hs"]
terseRun (Ghc stage) $ arg "-M"
<> packageArgs stage pkgData
<> includeArgs path dist
- <> productArgs ["-odir", "-stubdir"] buildDir
- <> arg ["-dep-makefile", out <.> "new"]
+ <> productArgs ["-odir", "-stubdir", "-hidir"] buildDir
+ <> arg ["-dep-makefile", toStandard $ out <.> "new"]
<> productArgs "-dep-suffix" (map wayPrefix <$> ways settings)
<> arg (pkgHsSources path dist)
-- TODO: Check that skipping all _HC_OPTS is safe.
More information about the ghc-commits
mailing list