senfscons: Fix 'Object' build helper to work with empty source list in SCons 0.96.1
g0dil [Thu, 11 Oct 2007 06:26:38 +0000 (06:26 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@459 270642c3-0616-0410-b53a-bc976706d245

senfscons/SENFSCons.py

index 917f997..aa5efa2 100644 (file)
@@ -325,14 +325,14 @@ def Objects(env, sources, testSources = None, LIBS = [], OBJECTS = []):
 
     objects = None
     if sources:
-        objects = env.Object([
-            source
-            for source in sources
-            if not str(source).endswith('.o') ]) + [
-            source
-            for source in sources
-            if str(source).endswith('.o') ]
-        
+        obsources = [ source
+                      for source in sources
+                      if not str(source).endswith('.o') ]
+        objects = [ source
+                    for source in sources
+                    if str(source).endswith('.o') ]
+        if obsources:
+            objects += env.Object(obsources)
 
     if testSources:
         test = env.BoostUnitTests(