Missing import.
[libcxml.git] / cscript
1 import os
2
3 def build(target, options):
4     cmd = './waf configure --prefix=%s' % target.directory
5     if target.platform == 'linux':
6         cmd += ' --static'
7         if target.distro == 'centos':
8             # Centos builds using static boost, which means tests don't
9             # build as test/tests.cc defines BOOST_TEST_DYN_LINK
10             cmd += ' --disable-tests'
11     elif target.platform == 'windows':
12         cmd += ' --target-windows'
13     target.command(cmd)
14     target.command('./waf build install')
15
16 def test(target):
17     if target.platform != 'windows':
18         target.set('LC_ALL', 'C')
19         target.command('./run-tests.sh')
20
21 def make_doxygen(target):
22     os.makedirs('build/doc')
23     target.command('doxygen')
24     return os.path.abspath('build/doc/html')