summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-23 16:48:38 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:37 +1000
commit06940d57967039792d945a4999ccd31dfe4b83c4 (patch)
tree930a62b8b9067593260f1c97394a31499f5b03a0 /lib/replace
parenteab4d4598ef08c89f36180f8b9027444867e32bc (diff)
downloadsamba-06940d57967039792d945a4999ccd31dfe4b83c4.tar.gz
samba-06940d57967039792d945a4999ccd31dfe4b83c4.tar.bz2
samba-06940d57967039792d945a4999ccd31dfe4b83c4.zip
build: auto-strip empty dependencies
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/wafsamba.py10
1 files changed, 10 insertions, 0 deletions
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)