mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 18:07:12 +01:00
add default constraints on the case subst:foo.in->foo.h for convenience purposes
This commit is contained in:
parent
2477e19cbd
commit
062c5cae1a
@ -786,12 +786,18 @@ def process_subst(self):
|
||||
if not a:
|
||||
raise Errors.WafError('cound 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 and b.name.endswith('.h'):
|
||||
tsk.before = [k for k in ('c', 'cxx') if k in Task.classes]
|
||||
|
||||
inst_to = getattr(self, 'install_path', None)
|
||||
if inst_to:
|
||||
self.bld.install_files(inst_to, tgt, chmod=getattr(self, 'chmod', Utils.O644))
|
||||
|
Loading…
Reference in New Issue
Block a user