shithub: aubio

Download patch

ref: f6ee1606c56bb497f61231d271f40064decbc38f
parent: aad688ef4c6c4f4068b74bb99b227b34911b2afc
author: Paul Brossier <piem@piem.org>
date: Thu Nov 21 15:09:16 EST 2013

examples/wscript_build: simplify

--- a/examples/wscript_build
+++ b/examples/wscript_build
@@ -1,19 +1,20 @@
 # vim:set syntax=python:
 
+utils_source = ['utils.c', 'jackio.c']
+programs_source = ctx.path.ant_glob('*.c', excl = utils_source)
+
 # build examples
-utilsio = bld(
-        name = 'utilsio',
-        features = 'c',
-        includes = '../src',
-        source = ['utils.c', 'jackio.c'],
-        target = 'utilsio')
+bld(features = 'c',
+      source = utils_source,
+      includes = ['../src'],
+      target = 'utilsio')
 
 # loop over all *.c filenames in examples to build them all
-for source_file in ctx.path.ant_glob('*.c', excl = ['utils.c', 'jackio.c']):
-  bld.program(features = 'c cprogram',
+for source_file in programs_source:
+  bld(features = 'c cprogram',
       includes = '../src',
       lib = 'm',
       use = ['aubio', 'utilsio'],
-      source = str(source_file),
+      source = source_file,
       target = str(source_file).split('.')[0]
     )