shithub: aubio

Download patch

ref: 281381fc1bab18d5c377da243dadf6a9b894341b
parent: ea7428ac4de6ed38ec00e146cf0aa5bc3caa72f1
author: Paul Brossier <piem@piem.org>
date: Wed Jul 20 22:52:09 EDT 2016

{examples,tests}/wscrtip_build: update build target name

--- a/examples/wscript_build
+++ b/examples/wscript_build
@@ -1,5 +1,7 @@
 # vim:set syntax=python:
 
+import os.path
+
 uselib = ['aubio']
 uselib += ['JACK']
 
@@ -16,9 +18,10 @@
 
 # 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'],
        )
--- a/tests/wscript_build
+++ b/tests/wscript_build
@@ -1,5 +1,7 @@
 # vim:set syntax=python:
 
+import os.path
+
 uselib = ['aubio']
 
 includes = ['../src', '.']
@@ -6,9 +8,10 @@
 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,