From 06940d57967039792d945a4999ccd31dfe4b83c4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Feb 2010 16:48:38 +1100 Subject: build: auto-strip empty dependencies --- lib/replace/wafsamba.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/replace') diff --git a/lib/replace/wafsamba.py b/lib/replace/wafsamba.py index 58b8e79e35..4cf8902de6 100644 --- a/lib/replace/wafsamba.py +++ b/lib/replace/wafsamba.py @@ -220,7 +220,11 @@ def ADD_DEPENDENCIES(bld, name, deps): # extract out the system dependencies sysdeps = [] localdeps = [] + cache = BUILD_CACHE(bld, 'EMPTY_LIBS') for d in list2: + # strip out any dependencies on empty libraries + if d in cache: + continue libname = 'LIB_%s' % d.upper() if libname in bld.env: sysdeps.append(d) @@ -253,6 +257,12 @@ def SAMBA_LIBRARY(bld, libname, source_list, # print "Declaring SAMBA_LIBRARY %s" % libname #print "SAMBA_LIBRARY '%s' with deps '%s'" % (libname, deps) + # remember empty libraries, so we can strip the dependencies + if (source_list == '') or (source_list == []): + cache = BUILD_CACHE(bld, 'EMPTY_LIBS') + cache[libname] = True + return + (sysdeps, deps) = ADD_DEPENDENCIES(bld, libname, deps) ilist = bld.SAMBA_LIBRARY_INCLUDE_LIST(deps) + bld.SUBDIR(bld.curdir, include_list) -- cgit