cdist tinkering.
authorCarl Hetherington <cth@carlh.net>
Wed, 17 Apr 2013 23:26:44 +0000 (00:26 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 17 Apr 2013 23:26:44 +0000 (00:26 +0100)
cbuild [new file with mode: 0755]
cscript

diff --git a/cbuild b/cbuild
new file mode 100755 (executable)
index 0000000..59beeb1
--- /dev/null
+++ b/cbuild
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+
+import argparse
+import os
+
+parser = argparse.ArgumentParser()
+parser.add_argument('command')
+parser.add_argument('-p', '--prefix', help='prefix', required=True)
+args = parser.parse_args()
+
+def command(c):
+    print c
+    os.system(c)
+
+if args.command == 'build':
+    command('./waf configure --prefix=%s build install' % args.prefix)
diff --git a/cscript b/cscript
index 0457ebbff6995e62786425112044a911fed4fe94..9e0eaaaccd3c1ff08181b395b20b3e0c79767896 100644 (file)
--- a/cscript
+++ b/cscript
@@ -1,7 +1,14 @@
 release_targets = ['source']
 
-def build(dep_prefix, install_prefix):
-    command("""CXXFLAGS=-I%s/include LINKFLAGS=-L%s/lib PKG_CONFIG_PATH=%s/lib/pkgconfig
-               ./waf configure --static-openjpeg --static-libdcp --prefix=%s build install""" % (dep_prefix, dep_prefix, dep_prefix, install_prefix))
+def build(dep_prefix, install_prefix, target, static, parallel):
+    configure = './waf configure --prefix=%s' % install_prefix
+    if static:
+        configure += ' --static-openjpeg --static-libdcp'
+
+    var = "CXXFLAGS=-I%s/include LINKFLAGS=-L%s/lib PKG_CONFIG_PATH=%s/lib/pkgconfig" % (dep_prefix, dep_prefix, dep_prefix)
+
+    command('%s %s' % (var, configure))
+    command('./waf build install')
+