From 6f36a015b1975a9ea027da8cf009cd38f074d77f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 21 Oct 2010 13:52:47 +1100 Subject: waf: prevent the global deps list creating depenency loops this prevents a loop between SOCKET_WRAPPER and replace in the s3 waf build --- buildtools/wafsamba/samba_deps.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py index 59bb764fb7..5f9f294e56 100644 --- a/buildtools/wafsamba/samba_deps.py +++ b/buildtools/wafsamba/samba_deps.py @@ -414,14 +414,22 @@ def build_direct_deps(bld, tgt_list): targets = LOCAL_CACHE(bld, 'TARGET_TYPE') syslib_deps = LOCAL_CACHE(bld, 'SYSLIB_DEPS') + global_deps = bld.env.GLOBAL_DEPENDENCIES + global_deps_exclude = set() + for dep in global_deps: + t = bld.name_to_obj(dep, bld.env) + for d in t.samba_deps: + # prevent loops from the global dependencies list + global_deps_exclude.add(d) + global_deps_exclude.add(d + '.objlist') for t in tgt_list: t.direct_objects = set() t.direct_libs = set() t.direct_syslibs = set() deps = t.samba_deps_extended[:] - if getattr(t, 'samba_use_global_deps', False): + if getattr(t, 'samba_use_global_deps', False) and not t.sname in global_deps_exclude: deps.extend(global_deps) for d in deps: d = EXPAND_ALIAS(bld, d) -- cgit