Bump libdcp.
[libsub.git] / cscript
diff --git a/cscript b/cscript
index 31add728852c5814a58e10f023bcda7d86ffab0e..381300d083963c28c7601d388f3ffac3bc029e2c 100644 (file)
--- a/cscript
+++ b/cscript
@@ -1,11 +1,20 @@
 import os
 
+def dependencies(target):
+    return (('libdcp', '689d563'),)
+
 def build(target, options):
-    cmd = './waf configure --prefix=%s' % target.work_dir_cscript()
+    cmd = './waf configure --prefix=%s' % target.directory
     if target.platform == 'linux':
         cmd += ' --static'
+        if target.distro == 'centos':
+            cmd += ' --disable-tests'
+        if (target.distro == 'debian' and target.version == 'unstable' or target.distro == 'fedora' and target.version == '23'):
+            target.append_with_space('CXXFLAGS', '-std=c++11')
     if target.debug:
         cmd += ' --enable-debug'
+    if target.platform == 'windows':
+        cmd += ' --target-windows --disable-tests'
 
     target.command(cmd)
     target.command('./waf build install')
@@ -14,3 +23,8 @@ def make_doxygen(target):
     os.makedirs('build/doc')
     target.command('doxygen')
     return os.path.abspath('build/doc/html')
+
+def test(target):
+    if target.platform != 'windows':
+        target.set('LC_ALL', 'C')
+        target.command('run/tests')