diff options
author | David Robillard <d@drobilla.net> | 2012-08-03 17:36:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-03 17:36:43 +0000 |
commit | 0994283a7d427b0554398b912360312b621de8ee (patch) | |
tree | be137fd02e83dc06596cea1b37ac6822bb360071 /wscript | |
parent | bd1ba4a37fcd3f74935099127c0ed6c234ab7e5a (diff) | |
download | lv2-0994283a7d427b0554398b912360312b621de8ee.tar.xz |
Add compile test for all headers.
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -307,6 +307,25 @@ def build(bld): source = ['lv2/lv2plug.in/ns/index.html.in'] + index_files, target = 'ns/index.html') + if bld.env['BUILD_TESTS']: + # Generate a compile test .c file that includes all headers + def gen_build_test(task): + out = open(task.outputs[0].abspath(), 'w') + for i in task.inputs: + out.write('#include "%s"\n' % i.bldpath()) + out.write('int main() { return 0; }\n') + out.close() + + bld(rule = gen_build_test, + source = bld.path.ant_glob('lv2/**/*.h'), + target = 'build_test.c', + install_path = None) + + bld(features = 'c', + source = bld.path.get_bld().make_node('build_test.c'), + target = 'build_test', + install_path = None) + def lint(ctx): for i in (['lv2/lv2plug.in/ns/lv2core/lv2.h'] + glob.glob('lv2/lv2plug.in/ns/ext/*/*.h') |