summaryrefslogtreecommitdiff
path: root/cbuild
blob: 836dabaaeaa1ed286d238324679d2201a281c4c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/python

import argparse
import os

parser = argparse.ArgumentParser()
parser.add_argument('command')
parser.add_argument('-p', '--prefix', help='prefix', required=True)
parser.add_argument('-s', '--static', help='build statically', action='store_true')
args = parser.parse_args()

def command(c):
    print c
    os.system(c)

if args.command == 'build':
    cmd = './waf configure --prefix=%s' % args.prefix
    if args.static:
        cmd += ' --static-libdcp --static-openjpeg'
    cmd += ' build install'
    command(cmd)