summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-20 17:10:51 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:56 +1000
commit0bad3dacb02411f46921af23faccd66f4196268f (patch)
tree65e267b8acd7e83f836425694b6ad162d4003217
parent702615dadc34897ee5876a67ed7f4acee375f30e (diff)
downloadsamba-0bad3dacb02411f46921af23faccd66f4196268f.tar.gz
samba-0bad3dacb02411f46921af23faccd66f4196268f.tar.bz2
samba-0bad3dacb02411f46921af23faccd66f4196268f.zip
build: cope with multiple checks for the same function/library
-rw-r--r--buildtools/wafsamba/samba_autoconf.py3
-rw-r--r--buildtools/wafsamba/samba_utils.py9
2 files changed, 11 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 4d6ac26a6c..028f5f269a 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -295,7 +295,8 @@ def CHECK_FUNCS_IN(conf, list, library, mandatory=False, checklibc=False):
remaining = TO_LIST(list)
if remaining == []:
- SET_TARGET_TYPE(conf, library, 'EMPTY')
+ if GET_TARGET_TYPE(conf, library) != 'SYSLIB':
+ SET_TARGET_TYPE(conf, library, 'EMPTY')
return True
if not conf.check(lib=library, uselib_store=library):
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 7c0f4644ab..9893a86c30 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -34,6 +34,15 @@ def SET_TARGET_TYPE(ctx, target, value):
debug("task_gen: Target '%s' created of type '%s' in %s" % (target, value, ctx.curdir))
return True
+
+def GET_TARGET_TYPE(ctx, target):
+ '''get target type from cache'''
+ cache = LOCAL_CACHE(ctx, 'TARGET_TYPE')
+ if not target in cache:
+ return None
+ return cache[target]
+
+
######################################################
# this is used as a decorator to make functions only
# run once. Based on the idea from