diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-03 10:49:08 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-03 10:53:12 +1100 |
commit | 2a5e5cd8fa651b819182a2c57b580ab278b4945a (patch) | |
tree | b583324b3819c329332ac8fd2f942258327df05c /buildtools/wafsamba | |
parent | 5a3d22a25660525970e1b5c8a0e0be2090dd4d0e (diff) | |
download | samba-2a5e5cd8fa651b819182a2c57b580ab278b4945a.tar.gz samba-2a5e5cd8fa651b819182a2c57b580ab278b4945a.tar.bz2 samba-2a5e5cd8fa651b819182a2c57b580ab278b4945a.zip |
waf: fixed wildcard build for full paths
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r-- | buildtools/wafsamba/samba_wildcard.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_wildcard.py b/buildtools/wafsamba/samba_wildcard.py index 19f70efc92..5bf12672a9 100644 --- a/buildtools/wafsamba/samba_wildcard.py +++ b/buildtools/wafsamba/samba_wildcard.py @@ -5,6 +5,7 @@ import os, datetime import Scripting, Utils, Options, Logs, Environment, fnmatch from Constants import * +from samba_utils import * def run_task(t, k): '''run a single build task''' @@ -19,15 +20,27 @@ def run_named_build_task(cmd): bld = fake_build_environment() found = False cwd_node = bld.root.find_dir(os.getcwd()) + top_node = bld.root.find_dir(bld.srcnode.abspath()) + cmd = os.path.normpath(cmd) + + # cope with builds of bin/*/* + if os.path.islink(cmd): + cmd = os_path_relpath(os.readlink(cmd), os.getcwd()) + + if cmd[0:12] == "bin/default/": + cmd = cmd[12:] + for g in bld.task_manager.groups: for attr in ['outputs', 'inputs']: for t in g.tasks: s = getattr(t, attr, []) for k in s: - relpath = k.relpath_gen(cwd_node) - if fnmatch.fnmatch(relpath, cmd): - t.position= [0,0] + relpath1 = k.relpath_gen(cwd_node) + relpath2 = k.relpath_gen(top_node) + if (fnmatch.fnmatch(relpath1, cmd) or + fnmatch.fnmatch(relpath2, cmd)): + t.position = [0,0] print(t.display()) run_task(t, k) found = True |