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