[commit: ghc] wip/nfs-locking: Add DepIncludeDirs package data option. (91a8bab)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:25:30 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/91a8babed3f640ecd972c7a20fd574e3853250d1/ghc
>---------------------------------------------------------------
commit 91a8babed3f640ecd972c7a20fd574e3853250d1
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Mon Jan 19 11:49:40 2015 +0000
Add DepIncludeDirs package data option.
>---------------------------------------------------------------
91a8babed3f640ecd972c7a20fd574e3853250d1
src/Oracles/PackageData.hs | 42 ++++++++++++++++++++++--------------------
src/Package/Base.hs | 2 +-
src/Package/Compile.hs | 1 +
src/Targets.hs | 1 +
4 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/src/Oracles/PackageData.hs b/src/Oracles/PackageData.hs
index 38accfe..760f47e 100644
--- a/src/Oracles/PackageData.hs
+++ b/src/Oracles/PackageData.hs
@@ -23,16 +23,17 @@ data PackageData = Version FilePath
| PackageKey FilePath
| Synopsis FilePath
-data MultiPackageData = Modules FilePath
- | SrcDirs FilePath
- | IncludeDirs FilePath
- | Deps FilePath
- | DepKeys FilePath
- | DepNames FilePath
- | CppArgs FilePath
- | HsArgs FilePath
- | CcArgs FilePath
- | CSrcs FilePath
+data MultiPackageData = Modules FilePath
+ | SrcDirs FilePath
+ | IncludeDirs FilePath
+ | Deps FilePath
+ | DepKeys FilePath
+ | DepNames FilePath
+ | CppArgs FilePath
+ | HsArgs FilePath
+ | CcArgs FilePath
+ | CSrcs FilePath
+ | DepIncludeDirs FilePath
newtype PackageDataKey = PackageDataKey (FilePath, String)
deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
@@ -53,16 +54,17 @@ instance ShowArg PackageData where
instance ShowArgs MultiPackageData where
showArgs packageData = do
let (key, path, defaultValue) = case packageData of
- Modules path -> ("MODULES" , path, "" )
- SrcDirs path -> ("HS_SRC_DIRS" , path, ".")
- IncludeDirs path -> ("INCLUDE_DIRS", path, ".")
- Deps path -> ("DEPS" , path, "" )
- DepKeys path -> ("DEP_KEYS" , path, "" )
- DepNames path -> ("DEP_NAMES" , path, "" )
- CppArgs path -> ("CPP_OPTS" , path, "" )
- HsArgs path -> ("HC_OPTS" , path, "" )
- CcArgs path -> ("CC_OPTS" , path, "" )
- CSrcs path -> ("C_SRCS" , path, "" )
+ Modules path -> ("MODULES" , path, "" )
+ SrcDirs path -> ("HS_SRC_DIRS" , path, ".")
+ IncludeDirs path -> ("INCLUDE_DIRS" , path, ".")
+ Deps path -> ("DEPS" , path, "" )
+ DepKeys path -> ("DEP_KEYS" , path, "" )
+ DepNames path -> ("DEP_NAMES" , path, "" )
+ CppArgs path -> ("CPP_OPTS" , path, "" )
+ HsArgs path -> ("HC_OPTS" , path, "" )
+ CcArgs path -> ("CC_OPTS" , path, "" )
+ CSrcs path -> ("C_SRCS" , path, "" )
+ DepIncludeDirs path -> ("DEP_LIB_REL_DIRS", path, "" )
fullKey = replaceSeparators '_' $ path ++ "_" ++ key
pkgData = path </> "package-data.mk"
res <- askOracle $ PackageDataKey (pkgData, fullKey)
diff --git a/src/Package/Base.hs b/src/Package/Base.hs
index cf29e59..aafc85b 100644
--- a/src/Package/Base.hs
+++ b/src/Package/Base.hs
@@ -155,7 +155,7 @@ findModuleFiles pathDist directories suffixes = do
] $ \file -> do
let dir = takeDirectory file
dirExists <- liftIO $ S.doesDirectoryExist dir
- when dirExists $ return file
+ when dirExists $ return $ unifyPath file
files <- getDirectoryFiles "" fileList
return $ map unifyPath files
diff --git a/src/Package/Compile.hs b/src/Package/Compile.hs
index d99e2bf..e98f1a5 100644
--- a/src/Package/Compile.hs
+++ b/src/Package/Compile.hs
@@ -35,6 +35,7 @@ gccArgs (Package _ path _) (_, dist, _) srcs result =
, commonCcArgs
, commonCcWarninigArgs
, pathArgs "-I" path $ IncludeDirs pathDist
+ , pathArgs "-I" path $ DepIncludeDirs pathDist
, args ("-c":srcs)
, args ["-o", result] ]
diff --git a/src/Targets.hs b/src/Targets.hs
index cf1ceb2..847c1fa 100644
--- a/src/Targets.hs
+++ b/src/Targets.hs
@@ -21,6 +21,7 @@ libraryPackagesInStage Stage1 =
, "deepseq"
, "directory"
, "filepath"
+ , "ghc-prim"
, "parallel"
, "pretty"
, "stm"
More information about the ghc-commits
mailing list