make copies of global lists before extending
authorNils Philippsen <nils@tiptoe.de>
Mon, 23 Nov 2015 12:52:14 +0000 (13:52 +0100)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 23 Nov 2015 13:43:19 +0000 (08:43 -0500)
Not doing so can make source or object files appear multiple times in
the list of files to be compiled or linked, e.g. when doing './waf build
install', subsequently leading to linker errors.

gtk2_ardour/wscript
libs/ardour/wscript
libs/gtkmm2ext/wscript

index 34bf3f04ebd44efd53b5415732e3304b71090f4d..e58c50c1a80d3dafd8cb683ccaf3c2a69b0f0e72 100644 (file)
@@ -422,7 +422,8 @@ def build(bld):
 
         # now the shared library containing the GTK GUI for ardour
         obj = bld (features = 'cxx c cxxshlib')
-        obj.source    = gtk2_ardour_sources
+        # operate on copy to avoid adding sources twice
+        obj.source    = list(gtk2_ardour_sources)
         obj.includes  = [ '../libs/fst', '.' ]
         obj.name      = 'libgtk2_ardour'
         obj.target    = 'gtk2_ardour'
@@ -433,7 +434,8 @@ def build(bld):
             obj = bld (features = 'cxx c cxxprogram winres')
         else:
             obj = bld (features = 'cxx c cxxprogram')
-        obj.source    = gtk2_ardour_sources
+        # operate on copy to avoid adding sources twice
+        obj.source    = list(gtk2_ardour_sources)
         obj.target = 'ardour-' + str (bld.env['VERSION'])
         obj.includes = ['.']
         obj.ldflags = ['-no-undefined']
index c0ef56b7e36e7cb9089c651f264be8f4fffc419c..262b10159a534bead89ed629f326097461975e3d 100644 (file)
@@ -335,7 +335,8 @@ def build(bld):
     # micro increment <=> no interface changes
     LIBARDOUR_LIB_VERSION = "3.0.0"
 
-    sources = libardour_sources
+    # operate on copy to avoid adding sources twice
+    sources = list(libardour_sources)
     if bld.is_tracks_build():
         sources += [ 'engine_state_controller.cc' ]
     
index b7545c33c51221e74772735247b734ff7fc5a0f4..1832d6a03e05268ee58e87d66459c9e2c4499a09 100644 (file)
@@ -84,7 +84,8 @@ def configure(conf):
 
 
 def build(bld):
-    sources = gtkmm2ext_sources
+    # operate on copy to avoid adding sources twice
+    sources = list(gtkmm2ext_sources)
     if bld.is_tracks_build():
         sources += [ 'waves_fastmeter.cc', 'fader.cc' ]
     else: