wafsamba: Cope with not everything having a final_libs attribute.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 4 Dec 2011 14:36:27 +0000 (15:36 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 5 Dec 2011 22:11:05 +0000 (23:11 +0100)
buildtools/wafsamba/samba_utils.py

index c388150..71cfbc5 100644 (file)
@@ -65,7 +65,7 @@ def ADD_LD_LIBRARY_PATH(path):
 
 def needs_private_lib(bld, target):
     '''return True if a target links to a private library'''
 
 def needs_private_lib(bld, target):
     '''return True if a target links to a private library'''
-    for lib in target.final_libs:
+    for lib in getattr(target, "final_libs", []):
         t = bld.name_to_obj(lib, bld.env)
         if t and getattr(t, 'private_library', False):
             return True
         t = bld.name_to_obj(lib, bld.env)
         if t and getattr(t, 'private_library', False):
             return True