aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-03 17:36:43 +0000
committerDavid Robillard <d@drobilla.net>2012-08-03 17:36:43 +0000
commit0994283a7d427b0554398b912360312b621de8ee (patch)
treebe137fd02e83dc06596cea1b37ac6822bb360071 /wscript
parentbd1ba4a37fcd3f74935099127c0ed6c234ab7e5a (diff)
downloadlv2-0994283a7d427b0554398b912360312b621de8ee.tar.xz
Add compile test for all headers.
Diffstat (limited to 'wscript')
-rw-r--r--wscript19
1 files changed, 19 insertions, 0 deletions
diff --git a/wscript b/wscript
index 61dd66c..18381a9 100644
--- a/wscript
+++ b/wscript
@@ -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')