Add Config.hs (autoconf and configure rules).
authorAndrey Mokhov <andrey.mokhov@ncl.ac.uk>
Tue, 23 Dec 2014 17:45:51 +0000 (17:45 +0000)
committerAndrey Mokhov <andrey.mokhov@ncl.ac.uk>
Tue, 23 Dec 2014 17:45:51 +0000 (17:45 +0000)
Config.hs [new file with mode: 0644]

diff --git a/Config.hs b/Config.hs
new file mode 100644 (file)
index 0000000..a370f38
--- /dev/null
+++ b/Config.hs
@@ -0,0 +1,24 @@
+module Config (
+    autoconfRules, configureRules
+    ) where
+
+import Development.Shake
+import Development.Shake.Command
+import Development.Shake.FilePath
+import Development.Shake.Rule
+import Control.Applicative
+import Control.Monad
+import Base
+import Oracles
+
+autoconfRules :: Rules ()
+autoconfRules = do
+    "shake/configure" %> \out -> do
+        need ["shake/configure.ac"]
+        cmd $ "bash shake/autoconf"
+
+configureRules :: Rules ()
+configureRules = do
+    "shake/default.config" %> \out -> do
+        need ["shake/default.config.in", "shake/configure"]
+        cmd $ "bash shake/configure"