git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
eab4d45
)
build: auto-strip empty dependencies
author
Andrew Tridgell
<tridge@samba.org>
Tue, 23 Feb 2010 05:48:38 +0000
(16:48 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Tue, 6 Apr 2010 10:26:37 +0000
(20:26 +1000)
lib/replace/wafsamba.py
patch
|
blob
|
history
diff --git
a/lib/replace/wafsamba.py
b/lib/replace/wafsamba.py
index 58b8e79e35aa47126e1e9835cd79b60d39c07c6e..4cf8902de6d53e3b6d1ca0115181d3a373196f23 100644
(file)
--- 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 = []
# extract out the system dependencies
sysdeps = []
localdeps = []
+ cache = BUILD_CACHE(bld, 'EMPTY_LIBS')
for d in list2:
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)
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)
# 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)
(sysdeps, deps) = ADD_DEPENDENCIES(bld, libname, deps)
ilist = bld.SAMBA_LIBRARY_INCLUDE_LIST(deps) + bld.SUBDIR(bld.curdir, include_list)