build: cope with duplicates in source lists
authorAndrew Tridgell <tridge@samba.org>
Sun, 25 Apr 2010 02:41:41 +0000 (12:41 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 26 Apr 2010 04:36:54 +0000 (14:36 +1000)
buildtools/wafsamba/wafsamba.py

index 95410aac6e23f852ddef69ad4277eba4e0f7dfdb..56ecfb1df3e3ca6f01be1c75225729246d1e22b6 100644 (file)
@@ -239,6 +239,7 @@ def SAMBA_BINARY(bld, binname, source,
     obj_target = binname + '.objlist'
 
     source = bld.EXPAND_VARIABLES(source, vars=vars)
+    source = unique_list(TO_LIST(source))
 
     # first create a target for building the object files for this binary
     # by separating in this way, we avoid recompiling the C files
@@ -325,6 +326,7 @@ def SAMBA_MODULE(bld, modname, source,
         return
 
     source = bld.EXPAND_VARIABLES(source, vars=vars)
+    source = unique_list(TO_LIST(source))
 
     # remember empty modules, so we can strip the dependencies
     if (source == '') or (source == []):
@@ -349,7 +351,7 @@ def SAMBA_MODULE(bld, modname, source,
         )
 
     if autoproto is not None:
-        bld.SAMBA_AUTOPROTO(autoproto, source + ' ' + autoproto_extra_source)
+        bld.SAMBA_AUTOPROTO(autoproto, source + TO_LIST(autoproto_extra_source))
 
 Build.BuildContext.SAMBA_MODULE = SAMBA_MODULE
 
@@ -395,6 +397,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
         return
 
     source = bld.EXPAND_VARIABLES(source, vars=vars)
+    source = unique_list(TO_LIST(source))
 
     deps += ' ' + public_deps
 
@@ -427,7 +430,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
     if heimdal_autoproto_private is not None:
         bld.HEIMDAL_AUTOPROTO_PRIVATE(heimdal_autoproto_private, source)
     if autoproto is not None:
-        bld.SAMBA_AUTOPROTO(autoproto, source + ' ' + autoproto_extra_source)
+        bld.SAMBA_AUTOPROTO(autoproto, source + TO_LIST(autoproto_extra_source))
     if public_headers is not None:
         bld.PUBLIC_HEADERS(public_headers, header_path=header_path)
     return t