[commit: ghc] wip/nfs-locking: Add Ranlib and Tar builders. (d06dabc)

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


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

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

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

commit d06dabcb601c169ad1f8742e318d899891b380e3
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Jan 3 01:09:34 2016 +0000

    Add Ranlib and Tar builders.


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

d06dabcb601c169ad1f8742e318d899891b380e3
 cfg/system.config.in         |  2 ++
 src/Builder.hs               |  4 ++++
 src/Settings/Args.hs         |  4 +++-
 src/Settings/Builders/Tar.hs | 10 ++++++++++
 4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/cfg/system.config.in b/cfg/system.config.in
index c5808c7..7f9b8de 100644
--- a/cfg/system.config.in
+++ b/cfg/system.config.in
@@ -38,6 +38,8 @@ hscolour         = @HSCOLOUR@
 ld               = @LdCmd@
 nm               = @NmCmd@
 objdump          = @ObjdumpCmd@
+ranlib           = @REAL_RANLIB_CMD@
+tar              = @TarCmd@
 
 # Information about builders:
 #============================
diff --git a/src/Builder.hs b/src/Builder.hs
index c8e3f6e..ad7c9f0 100644
--- a/src/Builder.hs
+++ b/src/Builder.hs
@@ -41,6 +41,8 @@ data Builder = Alex
              | Ld
              | Nm
              | Objdump
+             | Ranlib
+             | Tar
              | Unlit
              deriving (Show, Eq, Generic)
 
@@ -81,6 +83,8 @@ builderKey builder = case builder of
     Ld               -> "ld"
     Nm               -> "nm"
     Objdump          -> "objdump"
+    Ranlib           -> "ranlib"
+    Tar              -> "tar"
     Unlit            -> "unlit"
 
 -- | Determine the location of a 'Builder'
diff --git a/src/Settings/Args.hs b/src/Settings/Args.hs
index c4c919c..a677c80 100644
--- a/src/Settings/Args.hs
+++ b/src/Settings/Args.hs
@@ -17,6 +17,7 @@ import Settings.Builders.Happy
 import Settings.Builders.Hsc2Hs
 import Settings.Builders.HsCpp
 import Settings.Builders.Ld
+import Settings.Builders.Tar
 import Settings.Packages.Base
 import Settings.Packages.Compiler
 import Settings.Packages.Directory
@@ -57,7 +58,8 @@ defaultBuilderArgs = mconcat
     , happyBuilderArgs
     , hsc2hsBuilderArgs
     , hsCppBuilderArgs
-    , ldBuilderArgs ]
+    , ldBuilderArgs
+    , tarBuilderArgs ]
 
 defaultPackageArgs :: Args
 defaultPackageArgs = mconcat
diff --git a/src/Settings/Builders/Tar.hs b/src/Settings/Builders/Tar.hs
new file mode 100644
index 0000000..1f9f0ba
--- /dev/null
+++ b/src/Settings/Builders/Tar.hs
@@ -0,0 +1,10 @@
+module Settings.Builders.Tar (tarBuilderArgs) where
+
+import Expression
+import Predicates (builder)
+
+tarBuilderArgs :: Args
+tarBuilderArgs = builder Tar ? do
+    mconcat [ arg "-xzf"
+            , arg =<< getInput
+            , arg "-C", arg =<< getOutput ]



More information about the ghc-commits mailing list