build: cope with multiple checks for the same function/library
authorAndrew Tridgell <tridge@samba.org>
Sat, 20 Mar 2010 06:10:51 +0000 (17:10 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:56 +0000 (20:26 +1000)
buildtools/wafsamba/samba_autoconf.py
buildtools/wafsamba/samba_utils.py

index 4d6ac26a6cca86d7bed0e5f00f40d12414566a7d..028f5f269afb1f68858cde392cad46ffbdd0b4ec 100644 (file)
@@ -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):
index 7c0f4644ab8fbf460ade055ce19d14b7f8b618f5..9893a86c300b6655f25262f9e6fef9de7dac2945 100644 (file)
@@ -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