diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-10-29 11:52:25 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-10-30 23:49:00 +1100 |
commit | ccbb77693cec4e612d839b2dca92f97aa05f342e (patch) | |
tree | 8cece190d38f926fdc8c747f33730d5b5e7971af | |
parent | e97be0860b73270e610757c6c9312106587f7161 (diff) | |
download | samba-ccbb77693cec4e612d839b2dca92f97aa05f342e.tar.gz samba-ccbb77693cec4e612d839b2dca92f97aa05f342e.tar.bz2 samba-ccbb77693cec4e612d839b2dca92f97aa05f342e.zip |
waf: separate out get_tgt_list()
this is a useful function for the new symbols code, so separate it out
of samba_deps.py
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | buildtools/wafsamba/samba_deps.py | 13 | ||||
-rw-r--r-- | buildtools/wafsamba/samba_utils.py | 19 |
2 files changed, 20 insertions, 12 deletions
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py index bbd945210b..3bcf8fd92e 100644 --- a/buildtools/wafsamba/samba_deps.py +++ b/buildtools/wafsamba/samba_deps.py @@ -1077,21 +1077,10 @@ def load_samba_deps(bld, tgt_list): def check_project_rules(bld): '''check the project rules - ensuring the targets are sane''' - targets = LOCAL_CACHE(bld, 'TARGET_TYPE') loops = {} inc_loops = {} - # build a list of task generators we are interested in - tgt_list = [] - for tgt in targets: - type = targets[tgt] - if not type in ['SUBSYSTEM', 'MODULE', 'BINARY', 'LIBRARY', 'ASN1', 'PYTHON']: - continue - t = bld.name_to_obj(tgt, bld.env) - if t is None: - Logs.error("Target %s of type %s has no task generator" % (tgt, type)) - sys.exit(1) - tgt_list.append(t) + tgt_list = get_tgt_list(bld) add_samba_attributes(bld, tgt_list) diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index 4139aa13f7..de630fedee 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -569,3 +569,22 @@ def make_libname(ctx, name, nolibprefix=False, version=None, python=False): libname = "%s%s.%s" % (root, ext, version) return libname Build.BuildContext.make_libname = make_libname + + +def get_tgt_list(bld): + '''return a list of build objects for samba''' + + targets = LOCAL_CACHE(bld, 'TARGET_TYPE') + + # build a list of task generators we are interested in + tgt_list = [] + for tgt in targets: + type = targets[tgt] + if not type in ['SUBSYSTEM', 'MODULE', 'BINARY', 'LIBRARY', 'ASN1', 'PYTHON']: + continue + t = bld.name_to_obj(tgt, bld.env) + if t is None: + Logs.error("Target %s of type %s has no task generator" % (tgt, type)) + sys.exit(1) + tgt_list.append(t) + return tgt_list |