[commit: ghc] wip/nfs-locking: Respect trackBuildSystem user setting (4ce3206)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:22:38 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/4ce32069c4b46822dae309002fcbece8b62627ea/ghc

>---------------------------------------------------------------

commit 4ce32069c4b46822dae309002fcbece8b62627ea
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Mon Jan 4 01:33:45 2016 +0000

    Respect trackBuildSystem user setting


>---------------------------------------------------------------

4ce32069c4b46822dae309002fcbece8b62627ea
 src/Rules/Generators/ConfigHs.hs         | 3 ++-
 src/Rules/Generators/GhcAutoconfH.hs     | 4 +++-
 src/Rules/Generators/GhcBootPlatformH.hs | 4 +++-
 src/Rules/Generators/GhcPlatformH.hs     | 4 +++-
 src/Rules/Generators/GhcVersionH.hs      | 4 ++++
 src/Rules/Generators/VersionHs.hs        | 4 +++-
 6 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/Rules/Generators/ConfigHs.hs b/src/Rules/Generators/ConfigHs.hs
index 1ec96e9..547670a 100644
--- a/src/Rules/Generators/ConfigHs.hs
+++ b/src/Rules/Generators/ConfigHs.hs
@@ -10,7 +10,8 @@ import Settings
 -- TODO: add tracking by moving these functions to separate tracked files
 generateConfigHs :: Expr String
 generateConfigHs = do
-    lift $ need [sourcePath -/- "Rules/Generators/ConfigHs.hs"]
+    when trackBuildSystem . lift $
+        need [sourcePath -/- "Rules/Generators/ConfigHs.hs"]
     cProjectName        <- getSetting ProjectName
     cProjectGitCommitId <- getSetting ProjectGitCommitId
     cProjectVersion     <- getSetting ProjectVersion
diff --git a/src/Rules/Generators/GhcAutoconfH.hs b/src/Rules/Generators/GhcAutoconfH.hs
index 67ec731..f5f89c6 100644
--- a/src/Rules/Generators/GhcAutoconfH.hs
+++ b/src/Rules/Generators/GhcAutoconfH.hs
@@ -3,6 +3,7 @@ module Rules.Generators.GhcAutoconfH (generateGhcAutoconfH) where
 import Base
 import Expression
 import Oracles
+import Settings.User
 
 -- TODO: change `mk/config.h` to `shake-build/cfg/config.h`
 configH :: FilePath
@@ -16,7 +17,8 @@ undefinePackage s
 
 generateGhcAutoconfH :: Expr String
 generateGhcAutoconfH = do
-    lift $ need [sourcePath -/- "Rules/Generators/GhcAutoconfH.hs"]
+    when trackBuildSystem . lift $
+        need [sourcePath -/- "Rules/Generators/GhcAutoconfH.hs"]
     configHContents  <- lift $ map undefinePackage <$> readFileLines configH
     tablesNextToCode <- lift $ ghcEnableTablesNextToCode
     ghcUnreg         <- getFlag GhcUnregisterised
diff --git a/src/Rules/Generators/GhcBootPlatformH.hs b/src/Rules/Generators/GhcBootPlatformH.hs
index 7416d24..6c111c2 100644
--- a/src/Rules/Generators/GhcBootPlatformH.hs
+++ b/src/Rules/Generators/GhcBootPlatformH.hs
@@ -3,10 +3,12 @@ module Rules.Generators.GhcBootPlatformH (generateGhcBootPlatformH) where
 import Base
 import Expression
 import Oracles
+import Settings.User
 
 generateGhcBootPlatformH :: Expr String
 generateGhcBootPlatformH = do
-    lift $ need [sourcePath -/- "Rules/Generators/GhcBootPlatformH.hs"]
+    when trackBuildSystem . lift $
+        need [sourcePath -/- "Rules/Generators/GhcBootPlatformH.hs"]
     stage <- getStage
     let cppify = replaceEq '-' '_' . replaceEq '.' '_'
         chooseSetting x y = getSetting $ if stage == Stage0 then x else y
diff --git a/src/Rules/Generators/GhcPlatformH.hs b/src/Rules/Generators/GhcPlatformH.hs
index 8652382..1deee3d 100644
--- a/src/Rules/Generators/GhcPlatformH.hs
+++ b/src/Rules/Generators/GhcPlatformH.hs
@@ -3,10 +3,12 @@ module Rules.Generators.GhcPlatformH (generateGhcPlatformH) where
 import Base
 import Expression
 import Oracles
+import Settings.User
 
 generateGhcPlatformH :: Expr String
 generateGhcPlatformH = do
-    lift $ need [sourcePath -/- "Rules/Generators/GhcPlatformH.hs"]
+    when trackBuildSystem . lift $
+        need [sourcePath -/- "Rules/Generators/GhcPlatformH.hs"]
     let cppify = replaceEq '-' '_' . replaceEq '.' '_'
     hostPlatform   <- getSetting HostPlatform
     hostArch       <- getSetting HostArch
diff --git a/src/Rules/Generators/GhcVersionH.hs b/src/Rules/Generators/GhcVersionH.hs
index a45df55..278813f 100644
--- a/src/Rules/Generators/GhcVersionH.hs
+++ b/src/Rules/Generators/GhcVersionH.hs
@@ -1,10 +1,14 @@
 module Rules.Generators.GhcVersionH (generateGhcVersionH) where
 
+import Base
 import Expression
 import Oracles
+import Settings.User
 
 generateGhcVersionH :: Expr String
 generateGhcVersionH = do
+    when trackBuildSystem . lift $
+        need [sourcePath -/- "Rules/Generators/GhcVersionH.hs"]
     version     <- getSetting ProjectVersionInt
     patchLevel1 <- getSetting ProjectPatchLevel1
     patchLevel2 <- getSetting ProjectPatchLevel2
diff --git a/src/Rules/Generators/VersionHs.hs b/src/Rules/Generators/VersionHs.hs
index 3023fc9..33b62193d 100644
--- a/src/Rules/Generators/VersionHs.hs
+++ b/src/Rules/Generators/VersionHs.hs
@@ -3,10 +3,12 @@ module Rules.Generators.VersionHs (generateVersionHs) where
 import Base
 import Expression
 import Oracles
+import Settings.User
 
 generateVersionHs :: Expr String
 generateVersionHs = do
-    lift $ need [sourcePath -/- "Rules/Generators/VersionHs.hs"]
+    when trackBuildSystem . lift $
+        need [sourcePath -/- "Rules/Generators/VersionHs.hs"]
     projectVersion <- getSetting ProjectVersion
     targetOs       <- getSetting TargetOs
     targetArch     <- getSetting TargetArch



More information about the ghc-commits mailing list