build:wafsamba: Removed unnecessary and misleading variables
authorThomas Nagy <tnagy@waf.io>
Wed, 4 Nov 2015 23:34:03 +0000 (00:34 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 6 Nov 2015 09:37:24 +0000 (10:37 +0100)
There is no 'allow_duplicates' attribute anywhere.
The function 'check_duplicate_sources' always returns True unless it raises an exception
There is no list of source files to use
The variable 'tstart' is unused

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Uri Simchoni uri@samba.org
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_deps.py

index f869deec9970e25ac920832f7415010ee1c932f7..9e5eab728fc9e43c9116d293ec75f066684710de 100644 (file)
@@ -260,15 +260,10 @@ def add_init_functions(self):
 
 
 def check_duplicate_sources(bld, tgt_list):
-    '''see if we are compiling the same source file more than once
-       without an allow_duplicates attribute'''
+    '''see if we are compiling the same source file more than once'''
 
     debug('deps: checking for duplicate sources')
-
     targets = LOCAL_CACHE(bld, 'TARGET_TYPE')
-    ret = True
-
-    global tstart
 
     for t in tgt_list:
         source_list = TO_LIST(getattr(t, 'source', ''))
@@ -286,7 +281,6 @@ def check_duplicate_sources(bld, tgt_list):
 
     # build a list of targets that each source file is part of
     for t in tgt_list:
-        sources = []
         if not targets[t.sname] in [ 'LIBRARY', 'BINARY', 'PYTHON' ]:
             continue
         for obj in t.add_objects:
@@ -306,7 +300,7 @@ def check_duplicate_sources(bld, tgt_list):
             if len(subsystems[s][tname]) > 1:
                 raise Utils.WafError("ERROR: source %s is in more than one subsystem of target '%s': %s" % (s, tname, subsystems[s][tname]))
 
-    return ret
+    return True
 
 
 def check_orphaned_targets(bld, tgt_list):