summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-21 13:56:32 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:34 +1000
commit45d23d1f5360046e7dc6d357a28bcf44db8207bc (patch)
treeb3ba1c6bb00d100eb29b3e71baf92be61c36f596
parent04aa584c02cdbad4b8bc23d3108953120b226a69 (diff)
downloadsamba-45d23d1f5360046e7dc6d357a28bcf44db8207bc.tar.gz
samba-45d23d1f5360046e7dc6d357a28bcf44db8207bc.tar.bz2
samba-45d23d1f5360046e7dc6d357a28bcf44db8207bc.zip
build: added recursive library handling
-rw-r--r--lib/replace/wafsamba.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/replace/wafsamba.py b/lib/replace/wafsamba.py
index 9ec905d316..f57ce28417 100644
--- a/lib/replace/wafsamba.py
+++ b/lib/replace/wafsamba.py
@@ -88,6 +88,7 @@ def SUBDIR(bld, subdir, list):
return ret
Build.BuildContext.SUBDIR = SUBDIR
+
################################################################
# this will contain the set of includes needed per Samba library
Build.BuildContext.SAMBA_LIBRARY_INCLUDES = {}
@@ -106,6 +107,16 @@ def SAMBA_LIBRARY_INCLUDE_LIST(bld, libdeps):
return ret
Build.BuildContext.SAMBA_LIBRARY_INCLUDE_LIST = SAMBA_LIBRARY_INCLUDE_LIST
+#################################################################
+# return a library list for a set of library dependencies
+def SAMBA_LIBRARY_LIB_LIST(bld, libdeps):
+ ret = ' '
+ for l in libdeps.split():
+ if l in bld.SAMBA_LIBRARY_DEPS:
+ ret = ret + l + ' ' + bld.SAMBA_LIBRARY_LIB_LIST(bld.SAMBA_LIBRARY_DEPS[l])
+ return ret
+Build.BuildContext.SAMBA_LIBRARY_LIB_LIST = SAMBA_LIBRARY_LIB_LIST
+
#################################################################
# define a Samba library
@@ -119,6 +130,7 @@ def SAMBA_LIBRARY(bld, libname, source_list,
includes='. ' + ilist,
vnum=vnum)
bld.SAMBA_LIBRARY_INCLUDES[libname] = ilist
+ bld.SAMBA_LIBRARY_DEPS[libname] = libdeps
Build.BuildContext.SAMBA_LIBRARY = SAMBA_LIBRARY
#################################################################
@@ -128,7 +140,7 @@ def SAMBA_BINARY(bld, binname, source_list, libdeps='', include_list=''):
features = 'cc cprogram',
source = source_list,
target = binname,
- uselib_local = libdeps,
+ uselib_local = bld.SAMBA_LIBRARY_LIB_LIST(libdeps),
includes = '. ' + bld.SAMBA_LIBRARY_INCLUDE_LIST(libdeps) + include_list)
Build.BuildContext.SAMBA_BINARY = SAMBA_BINARY