[commit: ghc] wip/nfs-locking: Merge Rules.Oracles into Rules (709ffb7)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:55:02 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/709ffb71d43a55e93a82577bd79b37d169b9754a/ghc
>---------------------------------------------------------------
commit 709ffb71d43a55e93a82577bd79b37d169b9754a
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sun Aug 13 16:34:01 2017 +0100
Merge Rules.Oracles into Rules
>---------------------------------------------------------------
709ffb71d43a55e93a82577bd79b37d169b9754a
hadrian.cabal | 1 -
src/Base.hs | 0
src/Main.hs | 9 ++++-----
src/Rules.hs | 30 ++++++++++++++++++++++++------
src/Rules/Oracles.hs | 21 ---------------------
5 files changed, 28 insertions(+), 33 deletions(-)
diff --git a/hadrian.cabal b/hadrian.cabal
index c39df50..c964f3b 100644
--- a/hadrian.cabal
+++ b/hadrian.cabal
@@ -52,7 +52,6 @@ executable hadrian
, Rules.Install
, Rules.Libffi
, Rules.Library
- , Rules.Oracles
, Rules.Perl
, Rules.Program
, Rules.Register
diff --git a/src/Main.hs b/src/Main.hs
index 0f65ecf..6843140 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -7,7 +7,6 @@ import qualified Environment
import qualified Rules
import qualified Rules.Clean
import qualified Rules.Install
-import qualified Rules.Oracles
import qualified Rules.SourceDist
import qualified Rules.Selftest
import qualified Rules.Test
@@ -23,14 +22,14 @@ main = shakeArgsWith options CmdLineFlag.cmdFlags $ \cmdLineFlags targets -> do
where
rules :: Rules ()
rules = do
+ Rules.buildRules
Rules.Clean.cleanRules
- Rules.Oracles.oracleRules
- Rules.SourceDist.sourceDistRules
+ Rules.Install.installRules
+ Rules.oracleRules
Rules.Selftest.selftestRules
+ Rules.SourceDist.sourceDistRules
Rules.Test.testRules
- Rules.buildRules
Rules.topLevelTargets
- Rules.Install.installRules
options :: ShakeOptions
options = shakeOptions
{ shakeChange = ChangeModtimeAndDigest
diff --git a/src/Rules.hs b/src/Rules.hs
index 359d3e9..335c4c3 100644
--- a/src/Rules.hs
+++ b/src/Rules.hs
@@ -1,10 +1,19 @@
-module Rules (topLevelTargets, packageTargets, buildRules) where
+module Rules (
+ buildRules, oracleRules, packageTargets, topLevelTargets
+ ) where
+
+import qualified Hadrian.Oracles.ArgsHash
+import qualified Hadrian.Oracles.DirectoryContents
+import qualified Hadrian.Oracles.KeyValue
+import qualified Hadrian.Oracles.Path
import Base
import Context
import Expression
import Flavour
import GHC
+import qualified Oracles.Dependencies
+import qualified Oracles.ModuleFiles
import qualified Rules.Compile
import qualified Rules.Data
import qualified Rules.Dependencies
@@ -18,9 +27,9 @@ import qualified Rules.Library
import qualified Rules.Perl
import qualified Rules.Program
import qualified Rules.Register
-import Oracles.Dependencies
import Settings
import Settings.Path
+import Target
allStages :: [Stage]
allStages = [minBound ..]
@@ -52,7 +61,7 @@ packageTargets stage pkg = do
ways <- interpretInContext context getLibraryWays
libs <- mapM (pkgLibraryFile . Context stage pkg) ways
docs <- interpretInContext context $ buildHaddock flavour
- more <- libraryTargets context
+ more <- Oracles.Dependencies.libraryTargets context
return $ [ pkgSetupConfigFile context | nonCabalContext context ]
++ [ pkgHaddockFile context | docs && stage == Stage1 ]
++ libs ++ more
@@ -102,8 +111,17 @@ buildRules = do
packageRules
Rules.Perl.perlScriptRules
+oracleRules :: Rules ()
+oracleRules = do
+ Hadrian.Oracles.ArgsHash.argsHashOracle trackArgument getArgs
+ Hadrian.Oracles.DirectoryContents.directoryContentsOracle
+ Hadrian.Oracles.KeyValue.keyValueOracle
+ Hadrian.Oracles.Path.pathOracle
+ Oracles.Dependencies.dependenciesOracles
+ Oracles.ModuleFiles.moduleFilesOracle
+
programsStage1Only :: [Package]
programsStage1Only =
- [ deriveConstants, genprimopcode, hp2ps, runGhc
- , ghcCabal, hpc, dllSplit, ghcPkg, hsc2hs
- , genapply, ghc ]
+ [ deriveConstants, genprimopcode, hp2ps, runGhc
+ , ghcCabal, hpc, dllSplit, ghcPkg, hsc2hs
+ , genapply, ghc ]
diff --git a/src/Rules/Oracles.hs b/src/Rules/Oracles.hs
deleted file mode 100644
index 5f1f55e..0000000
--- a/src/Rules/Oracles.hs
+++ /dev/null
@@ -1,21 +0,0 @@
-module Rules.Oracles (oracleRules) where
-
-import qualified Hadrian.Oracles.ArgsHash
-import qualified Hadrian.Oracles.DirectoryContents
-import qualified Hadrian.Oracles.KeyValue
-import qualified Hadrian.Oracles.Path
-
-import Base
-import qualified Oracles.Dependencies
-import qualified Oracles.ModuleFiles
-import Target
-import Settings
-
-oracleRules :: Rules ()
-oracleRules = do
- Hadrian.Oracles.ArgsHash.argsHashOracle trackArgument getArgs
- Hadrian.Oracles.DirectoryContents.directoryContentsOracle
- Hadrian.Oracles.KeyValue.keyValueOracle
- Hadrian.Oracles.Path.pathOracle
- Oracles.Dependencies.dependenciesOracles
- Oracles.ModuleFiles.moduleFilesOracle
More information about the ghc-commits
mailing list