[commit: ghc] wip/nfs-locking: Move GMP paths to Settings.Paths. (a88253a)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:11:39 UTC 2017


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

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

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

commit a88253a92b436358af15ab6ff5c99b5270ed6024
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Thu May 5 05:15:22 2016 +0100

    Move GMP paths to Settings.Paths.


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

a88253a92b436358af15ab6ff5c99b5270ed6024
 src/Rules/Generate.hs |  1 -
 src/Rules/Gmp.hs      | 11 +----------
 src/Rules/Library.hs  |  1 -
 src/Settings/Paths.hs | 26 +++++++++++++++++++-------
 4 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/src/Rules/Generate.hs b/src/Rules/Generate.hs
index 8d04e8d..78326dd 100644
--- a/src/Rules/Generate.hs
+++ b/src/Rules/Generate.hs
@@ -18,7 +18,6 @@ import Rules.Generators.GhcVersionH
 import Rules.Generators.VersionHs
 import Oracles.ModuleFiles
 import Rules.Actions
-import Rules.Gmp
 import Rules.Libffi
 import Settings
 import Target hiding (builder, context)
diff --git a/src/Rules/Gmp.hs b/src/Rules/Gmp.hs
index 9cec3a3..2de1878 100644
--- a/src/Rules/Gmp.hs
+++ b/src/Rules/Gmp.hs
@@ -1,4 +1,4 @@
-module Rules.Gmp (gmpRules, gmpBuildPath, gmpObjects, gmpLibraryH) where
+module Rules.Gmp (gmpRules) where
 
 import Base
 import Expression
@@ -16,18 +16,9 @@ gmpBase = "libraries/integer-gmp/gmp"
 gmpContext :: Context
 gmpContext = vanillaContext Stage1 integerGmp
 
-gmpObjects :: FilePath
-gmpObjects = gmpBuildPath -/- "objs"
-
-gmpLibrary :: FilePath
-gmpLibrary = gmpBuildPath -/- "libgmp.a"
-
 gmpLibraryInTreeH :: FilePath
 gmpLibraryInTreeH = gmpBuildPath -/- "include/gmp.h"
 
-gmpLibraryH :: FilePath
-gmpLibraryH = gmpBuildPath -/- "include/ghc-gmp.h"
-
 gmpLibraryFakeH :: FilePath
 gmpLibraryFakeH = gmpBase -/- "ghc-gmp.h"
 
diff --git a/src/Rules/Library.hs b/src/Rules/Library.hs
index 2b90d1f..0538e4e 100644
--- a/src/Rules/Library.hs
+++ b/src/Rules/Library.hs
@@ -11,7 +11,6 @@ import Expression
 import GHC
 import Oracles.PackageData
 import Rules.Actions
-import Rules.Gmp
 import Settings
 import Target
 
diff --git a/src/Settings/Paths.hs b/src/Settings/Paths.hs
index 01b3b16..7174a94 100644
--- a/src/Settings/Paths.hs
+++ b/src/Settings/Paths.hs
@@ -1,8 +1,8 @@
 module Settings.Paths (
     contextDirectory, buildPath, pkgDataFile, pkgHaddockFile, pkgLibraryFile,
-    pkgLibraryFile0, pkgGhciLibraryFile, gmpBuildPath, gmpBuildInfoPath,
-    packageDbDirectory, pkgConfFile, shakeFilesPath, bootPackageConstraints,
-    packageDependencies, libffiBuildPath
+    pkgLibraryFile0, pkgGhciLibraryFile, gmpBuildPath, gmpLibrary, gmpObjects,
+    gmpLibraryH, gmpBuildInfoPath, libffiBuildPath, shakeFilesPath, pkgConfFile,
+    packageDbDirectory, bootPackageConstraints, packageDependencies
     ) where
 
 import Base
@@ -67,18 +67,30 @@ pkgFile context prefix suffix = do
     componentId <- pkgData $ ComponentId path
     return $ path ~/~ prefix ++ componentId ++ suffix
 
--- | Build directory for in-tree libffi library.
-libffiBuildPath :: FilePath
-libffiBuildPath = buildRootPath -/- "stage1/libffi"
-
 -- | Build directory for in-tree GMP library.
 gmpBuildPath :: FilePath
 gmpBuildPath = buildRootPath ~/~ "stage1/gmp"
 
+-- | Path to the GMP library.
+gmpLibrary :: FilePath
+gmpLibrary = gmpBuildPath -/- "libgmp.a"
+
+-- | Path to the GMP library header.
+gmpLibraryH :: FilePath
+gmpLibraryH = gmpBuildPath -/- "include/ghc-gmp.h"
+
+-- | Path to the GMP library object files.
+gmpObjects :: FilePath
+gmpObjects = gmpBuildPath -/- "objs"
+
 -- | Path to the GMP library buildinfo file.
 gmpBuildInfoPath :: FilePath
 gmpBuildInfoPath = pkgPath integerGmp ~/~ "integer-gmp.buildinfo"
 
+-- | Build directory for in-tree libffi library.
+libffiBuildPath :: FilePath
+libffiBuildPath = buildRootPath -/- "stage1/libffi"
+
 -- TODO: move to buildRootPath, see #113
 -- StageN, N > 0, share the same packageDbDirectory
 -- | Path to package database directory of a given 'Stage'.



More information about the ghc-commits mailing list