waf: exclude build directory in collect_dirs_to_recurse()

Without this patch, if nodes that don't yet exist in the filesystem in
bld.bldnode were created before calls to this function, they'll be removed from
the tree in memory because "*" is passed to ant_glob() and the "remove" keyword
argument defaults to True.
This commit is contained in:
Gustavo Jose de Sousa 2016-03-09 19:36:35 -03:00 committed by Lucas De Marchi
parent 6619af2e22
commit 76bae701a8
1 changed files with 5 additions and 0 deletions

View File

@ -119,6 +119,11 @@ def configure(cfg):
def collect_dirs_to_recurse(bld, globs, **kw):
dirs = []
globs = Utils.to_list(globs)
if bld.bldnode.is_child_of(bld.srcnode):
kw['excl'] = Utils.to_list(kw.get('excl', []))
kw['excl'].append(bld.bldnode.path_from(bld.srcnode))
for g in globs:
for d in bld.srcnode.ant_glob(g + '/wscript', **kw):
dirs.append(d.parent.relpath())