[commit: ghc] wip/nfs-locking: Simplify Rules.Config. (7dc414c)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:59:50 UTC 2017


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

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

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

commit 7dc414caf7aa55531c2d25f69c785bec30f192c7
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Jul 19 16:55:54 2015 +0100

    Simplify Rules.Config.


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

7dc414caf7aa55531c2d25f69c785bec30f192c7
 src/Main.hs         |  3 +--
 src/Rules/Config.hs | 18 ++++++++----------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/Main.hs b/src/Main.hs
index 8bd3384..50420af 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -4,6 +4,5 @@ import Development.Shake
 main = shakeArgs shakeOptions{shakeFiles="_build/"} $ do
     oracleRules     -- see module Rules.Oracles
     packageRules    -- see module Rules
-    autoconfRules   -- see module Config
-    configureRules  -- see module Config
+    configRules     -- see module Rules.Config
     generateTargets -- see module Rules
diff --git a/src/Rules/Config.hs b/src/Rules/Config.hs
index 2aa3988..3fb4c6a 100644
--- a/src/Rules/Config.hs
+++ b/src/Rules/Config.hs
@@ -1,20 +1,18 @@
 module Rules.Config (
-    autoconfRules, configureRules
+    configRules
     ) where
 
 import Util
 import Oracles.Base
 
-autoconfRules :: Rules ()
-autoconfRules = do
-    "configure" %> \out -> do
-        copyFile' (configPath </> "configure.ac") "configure.ac"
-        putColoured White $ "Running autoconf..."
-        cmd "bash autoconf" -- TODO: get rid of 'bash'
-
-configureRules :: Rules ()
-configureRules = do
+configRules :: Rules ()
+configRules = do
     configPath </> "system.config" %> \out -> do
         need [configPath </> "system.config.in", "configure"]
         putColoured White "Running configure..."
         cmd "bash configure" -- TODO: get rid of 'bash'
+
+    "configure" %> \out -> do
+        copyFile' (configPath </> "configure.ac") "configure.ac"
+        putColoured White $ "Running autoconf..."
+        cmd "bash autoconf" -- TODO: get rid of 'bash'



More information about the ghc-commits mailing list