diff --git a/waflib/TaskGen.py b/waflib/TaskGen.py index 6d6313d6..00b67d30 100644 --- a/waflib/TaskGen.py +++ b/waflib/TaskGen.py @@ -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))