mirror of https://gitlab.com/ita1024/waf.git
Simplify build order settings for "subst" tasks
This commit is contained in:
parent
af4a768775
commit
0b5202a88b
|
@ -865,21 +865,17 @@ def process_subst(self):
|
|||
if not a:
|
||||
raise Errors.WafError('could not find %r for %r' % (x, self))
|
||||
|
||||
has_constraints = False
|
||||
tsk = self.create_task('subst', a, b)
|
||||
for k in ('after', 'before', 'ext_in', 'ext_out'):
|
||||
val = getattr(self, k, None)
|
||||
if val:
|
||||
has_constraints = True
|
||||
setattr(tsk, k, val)
|
||||
|
||||
# paranoid safety measure for the general case foo.in->foo.h with ambiguous dependencies
|
||||
if not has_constraints:
|
||||
global HEADER_EXTS
|
||||
for xt in HEADER_EXTS:
|
||||
if b.name.endswith(xt):
|
||||
tsk.before = [k for k in ('c', 'cxx') if k in Task.classes]
|
||||
break
|
||||
for xt in HEADER_EXTS:
|
||||
if b.name.endswith(xt):
|
||||
tsk.ext_in = tsk.ext_in + ['.h']
|
||||
break
|
||||
|
||||
inst_to = getattr(self, 'install_path', None)
|
||||
if inst_to:
|
||||
|
|
Loading…
Reference in New Issue