From 1395af060b566932391c9d0bb3566a9206e1161f Mon Sep 17 00:00:00 2001
From: g0dil <g0dil@wiback.org>
Date: Thu, 11 Oct 2007 06:26:38 +0000
Subject: [PATCH] senfscons: Fix 'Object' build helper to work with empty
 source list in SCons 0.96.1

---
 senfscons/SENFSCons.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py
index 917f99763..aa5efa2e9 100644
--- a/senfscons/SENFSCons.py
+++ b/senfscons/SENFSCons.py
@@ -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(
-- 
GitLab