summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-06 19:31:39 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:27 +1000
commit07d9da4d2f77d08c3a073453f4eaaf5c0939ccf5 (patch)
tree2a4e8449edd185c7b00e5f1351b7f7c43e273e4f /buildtools
parent35ec7c34b3a233a8d1b0a551b3c6095a45eb6bb6 (diff)
downloadsamba-07d9da4d2f77d08c3a073453f4eaaf5c0939ccf5.tar.gz
samba-07d9da4d2f77d08c3a073453f4eaaf5c0939ccf5.tar.bz2
samba-07d9da4d2f77d08c3a073453f4eaaf5c0939ccf5.zip
build: use a target_in_list() function for more flexible builtin control
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_bundled.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index 34199381b3..e0a8e54eae 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -15,14 +15,25 @@ def BUNDLED_NAME(bld, name, bundled_extension):
return name
+def target_in_list(target, lst, default):
+ for l in lst:
+ if target == l:
+ return True
+ if '!' + target == l:
+ return False
+ if l == 'ALL':
+ return True
+ if l == 'NONE':
+ return False
+ return default
+
+
def BUILTIN_LIBRARY(bld, name):
'''return True if a library should be builtin
instead of being built as a shared lib'''
if bld.env.DISABLE_SHARED:
return True
- if name in bld.env.BUILTIN_LIBRARIES:
- return True
- return False
+ return target_in_list(name, bld.env.BUILTIN_LIBRARIES, False)
def BUILTIN_DEFAULT(opt, builtins):