mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
build:wafsamba: Removed unnecessary and misleading variables
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>
This commit is contained in:
parent
bae51eb24e
commit
40a2deb520
@ -260,15 +260,10 @@ def add_init_functions(self):
|
|||||||
|
|
||||||
|
|
||||||
def check_duplicate_sources(bld, tgt_list):
|
def check_duplicate_sources(bld, tgt_list):
|
||||||
'''see if we are compiling the same source file more than once
|
'''see if we are compiling the same source file more than once'''
|
||||||
without an allow_duplicates attribute'''
|
|
||||||
|
|
||||||
debug('deps: checking for duplicate sources')
|
debug('deps: checking for duplicate sources')
|
||||||
|
|
||||||
targets = LOCAL_CACHE(bld, 'TARGET_TYPE')
|
targets = LOCAL_CACHE(bld, 'TARGET_TYPE')
|
||||||
ret = True
|
|
||||||
|
|
||||||
global tstart
|
|
||||||
|
|
||||||
for t in tgt_list:
|
for t in tgt_list:
|
||||||
source_list = TO_LIST(getattr(t, 'source', ''))
|
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
|
# build a list of targets that each source file is part of
|
||||||
for t in tgt_list:
|
for t in tgt_list:
|
||||||
sources = []
|
|
||||||
if not targets[t.sname] in [ 'LIBRARY', 'BINARY', 'PYTHON' ]:
|
if not targets[t.sname] in [ 'LIBRARY', 'BINARY', 'PYTHON' ]:
|
||||||
continue
|
continue
|
||||||
for obj in t.add_objects:
|
for obj in t.add_objects:
|
||||||
@ -306,7 +300,7 @@ def check_duplicate_sources(bld, tgt_list):
|
|||||||
if len(subsystems[s][tname]) > 1:
|
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]))
|
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):
|
def check_orphaned_targets(bld, tgt_list):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user