[commit: ghc] wip/nfs-locking: Move bootstrapping.conf to .build. (24e6c28)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:07:01 UTC 2017


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

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

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

commit 24e6c28e5884d49fbd408fe81fad9ca48c1f7f94
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Mon Jan 11 01:29:35 2016 +0000

    Move bootstrapping.conf to .build.
    
    See #113.


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

24e6c28e5884d49fbd408fe81fad9ca48c1f7f94
 shaking-up-ghc.cabal                          |  2 +-
 src/Base.hs                                   | 13 -------------
 src/Oracles/ModuleFiles.hs                    |  2 +-
 src/Rules/Libffi.hs                           |  2 +-
 src/Settings.hs                               |  4 ++--
 src/Settings/Builders/HsCpp.hs                |  2 +-
 src/Settings/Packages/Ghc.hs                  |  2 +-
 src/Settings/{TargetDirectory.hs => Paths.hs} | 17 +++++++++++++----
 8 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/shaking-up-ghc.cabal b/shaking-up-ghc.cabal
index a7b3352..a091020 100644
--- a/shaking-up-ghc.cabal
+++ b/shaking-up-ghc.cabal
@@ -95,7 +95,7 @@ executable ghc-shake
                        , Settings.Packages.RunGhc
                        , Settings.Packages.Touchy
                        , Settings.Packages.Unlit
-                       , Settings.TargetDirectory
+                       , Settings.Paths
                        , Settings.User
                        , Settings.Ways
                        , Stage
diff --git a/src/Base.hs b/src/Base.hs
index 4b6ad10..8786c26 100644
--- a/src/Base.hs
+++ b/src/Base.hs
@@ -18,7 +18,6 @@ module Base (
     -- * Paths
     shakeFilesPath, configPath, sourcePath, programInplacePath,
     bootPackageConstraints, packageDependencies,
-    packageConfiguration, packageConfigurationInitialised,
 
     -- * Output
     putColoured, putOracle, putBuild, putSuccess, putError, renderBox,
@@ -44,7 +43,6 @@ import qualified System.Directory as IO
 import System.IO
 
 -- TODO: reexport Stage, etc.?
-import Stage
 
 -- Build system files and paths
 shakePath :: FilePath
@@ -71,17 +69,6 @@ bootPackageConstraints = shakeFilesPath -/- "boot-package-constraints"
 packageDependencies :: FilePath
 packageDependencies = shakeFilesPath -/- "package-dependencies"
 
--- TODO: move to buildRootPath, see #113
-packageConfiguration :: Stage -> FilePath
-packageConfiguration Stage0 = "libraries/bootstrapping.conf"
-packageConfiguration _      = "inplace/lib/package.conf.d"
-
--- StageN, N > 0, share the same packageConfiguration (see above)
-packageConfigurationInitialised :: Stage -> FilePath
-packageConfigurationInitialised stage =
-    shakeFilesPath -/- "package-configuration-initialised-"
-    ++ stageString (min stage Stage1)
-
 -- Utility functions
 -- | Find and replace all occurrences of a value in a list
 replaceEq :: Eq a => a -> a -> [a] -> [a]
diff --git a/src/Oracles/ModuleFiles.hs b/src/Oracles/ModuleFiles.hs
index 33f6138..391990e 100644
--- a/src/Oracles/ModuleFiles.hs
+++ b/src/Oracles/ModuleFiles.hs
@@ -5,7 +5,7 @@ import Base
 import Oracles.PackageData
 import Package
 import Stage
-import Settings.TargetDirectory
+import Settings.Paths
 
 newtype ModuleFilesKey = ModuleFilesKey ([String], [FilePath])
     deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
diff --git a/src/Rules/Libffi.hs b/src/Rules/Libffi.hs
index 93a121b..7e811ba 100644
--- a/src/Rules/Libffi.hs
+++ b/src/Rules/Libffi.hs
@@ -7,7 +7,7 @@ import Oracles
 import Rules.Actions
 import Settings.Builders.Common
 import Settings.Packages.Rts
-import Settings.TargetDirectory
+import Settings.Paths
 import Settings.User
 
 -- TODO: this should be moved elsewhere
diff --git a/src/Settings.hs b/src/Settings.hs
index 229a2f9..12830ca 100644
--- a/src/Settings.hs
+++ b/src/Settings.hs
@@ -1,6 +1,6 @@
 module Settings (
     module Settings.Packages,
-    module Settings.TargetDirectory,
+    module Settings.Paths,
     module Settings.User,
     module Settings.Ways,
     getPkgData, getPkgDataList, getTopDirectory, programPath, isLibrary,
@@ -12,7 +12,7 @@ import Expression
 import Oracles
 import Oracles.ModuleFiles
 import Settings.Packages
-import Settings.TargetDirectory
+import Settings.Paths
 import Settings.User
 import Settings.Ways
 
diff --git a/src/Settings/Builders/HsCpp.hs b/src/Settings/Builders/HsCpp.hs
index 43b9455..c1f1435 100644
--- a/src/Settings/Builders/HsCpp.hs
+++ b/src/Settings/Builders/HsCpp.hs
@@ -5,7 +5,7 @@ import GHC
 import Oracles
 import Predicates (builder)
 import Settings.Builders.GhcCabal
-import Settings.TargetDirectory
+import Settings.Paths
 
 hsCppBuilderArgs :: Args
 hsCppBuilderArgs = builder HsCpp ? do
diff --git a/src/Settings/Packages/Ghc.hs b/src/Settings/Packages/Ghc.hs
index 0830cb6..a7936e9 100644
--- a/src/Settings/Packages/Ghc.hs
+++ b/src/Settings/Packages/Ghc.hs
@@ -4,7 +4,7 @@ import Expression
 import GHC (ghc, compiler)
 import Oracles.Config.Setting
 import Predicates (builder, builderGhc, package, notStage0)
-import Settings.TargetDirectory
+import Settings.Paths
 
 ghcPackageArgs :: Args
 ghcPackageArgs = package ghc ? do
diff --git a/src/Settings/TargetDirectory.hs b/src/Settings/Paths.hs
similarity index 73%
rename from src/Settings/TargetDirectory.hs
rename to src/Settings/Paths.hs
index 6bbef72..bec143b 100644
--- a/src/Settings/TargetDirectory.hs
+++ b/src/Settings/Paths.hs
@@ -1,14 +1,12 @@
-module Settings.TargetDirectory (
+module Settings.Paths (
     targetDirectory, targetPath, pkgDataFile, pkgHaddockFile, pkgLibraryFile,
-    pkgGhciLibraryFile
+    pkgGhciLibraryFile, packageConfiguration, packageConfigurationInitialised
     ) where
 
 import Base
 import Expression
 import Settings.User
 
--- TODO: rename to Settings.Paths as part of #113
-
 -- User can override the default target directory settings given below
 targetDirectory :: Stage -> Package -> FilePath
 targetDirectory = userTargetDirectory
@@ -41,3 +39,14 @@ pkgLibraryFile stage pkg componentId way = do
 pkgGhciLibraryFile :: Stage -> Package -> String -> FilePath
 pkgGhciLibraryFile stage pkg componentId =
     targetPath stage pkg -/- "build" -/- "HS" ++ componentId <.> "o"
+
+-- TODO: move to buildRootPath, see #113
+packageConfiguration :: Stage -> FilePath
+packageConfiguration Stage0 = buildRootPath -/- "stage0/bootstrapping.conf"
+packageConfiguration _      = "inplace/lib/package.conf.d"
+
+-- StageN, N > 0, share the same packageConfiguration (see above)
+packageConfigurationInitialised :: Stage -> FilePath
+packageConfigurationInitialised stage =
+    shakeFilesPath -/- "package-configuration-initialised-"
+    ++ stageString (min stage Stage1)



More information about the ghc-commits mailing list