From 0bad3dacb02411f46921af23faccd66f4196268f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 20 Mar 2010 17:10:51 +1100 Subject: build: cope with multiple checks for the same function/library --- buildtools/wafsamba/samba_utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'buildtools/wafsamba/samba_utils.py') 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 -- cgit