{examples,tests}/wscrtip_build: update build target name
authorPaul Brossier <piem@piem.org>
Thu, 21 Jul 2016 00:52:09 +0000 (02:52 +0200)
committerPaul Brossier <piem@piem.org>
Thu, 21 Jul 2016 00:52:09 +0000 (02:52 +0200)
examples/wscript_build
tests/wscript_build

index 47e748e..7970bf6 100644 (file)
@@ -1,5 +1,7 @@
 # vim:set syntax=python:
 
+import os.path
+
 uselib = ['aubio']
 uselib += ['JACK']
 
@@ -16,9 +18,10 @@ bld(features = 'c',
 
 # loop over all *.c filenames in examples to build them all
 for source_file in programs_source:
+    target = os.path.basename(os.path.splitext(str(source_file))[0])
     bld(features = 'c cprogram',
             source = source_file,
-            target = str(source_file).split('.')[0],
+            target = target,
             includes = includes,
             use = uselib + ['utilsio'],
        )
index 78bb646..45e83b8 100644 (file)
@@ -1,14 +1,17 @@
 # vim:set syntax=python:
 
+import os.path
+
 uselib = ['aubio']
 
 includes = ['../src', '.']
 programs_sources = ctx.path.ant_glob('src/**/*.c')
 
 for source_file in programs_sources:
+    target = os.path.basename(os.path.splitext(str(source_file))[0])
     bld(features = 'c cprogram test',
             source = source_file,
-            target = str(source_file).split('.')[0],
+            target = target,
             includes = includes,
             use = uselib,
             install_path = None,