From 178fadde4c7b4c0816f06ead30030fa29e7d13c7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 18 Apr 2013 00:26:44 +0100 Subject: cdist tinkering. --- cbuild | 16 ++++++++++++++++ cscript | 13 ++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100755 cbuild diff --git a/cbuild b/cbuild new file mode 100755 index 00000000..59beeb13 --- /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 0457ebbf..9e0eaaac 100644 --- 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') + -- cgit v1.2.3