| Index: pylib/gyp/generator/ninja.py
|
| diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
|
| index 5cda5c3ce1eb3af06375ae98e733b8600425a1af..0c7ce547c8862082cb0b0a07c4bdad3e04a294c6 100644
|
| --- a/pylib/gyp/generator/ninja.py
|
| +++ b/pylib/gyp/generator/ninja.py
|
| @@ -599,9 +599,13 @@ class NinjaWriter(object):
|
| is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(action)
|
| if self.flavor == 'win' else False)
|
| args = action['action']
|
| + depfile = action.get('depfile', None)
|
| + if depfile:
|
| + depfile = self.ExpandSpecial(depfile, self.base_to_build)
|
| pool = 'console' if int(action.get('ninja_use_console', 0)) else None
|
| rule_name, _ = self.WriteNewNinjaRule(name, args, description,
|
| - is_cygwin, env, pool)
|
| + is_cygwin, env, pool,
|
| + depfile=depfile)
|
|
|
| inputs = [self.GypPathToNinja(i, env) for i in action['inputs']]
|
| if int(action.get('process_outputs_as_sources', False)):
|
| @@ -1506,7 +1510,8 @@ class NinjaWriter(object):
|
| values = []
|
| ninja_file.variable(var, ' '.join(values))
|
|
|
| - def WriteNewNinjaRule(self, name, args, description, is_cygwin, env, pool):
|
| + def WriteNewNinjaRule(self, name, args, description, is_cygwin, env, pool,
|
| + depfile=None):
|
| """Write out a new ninja "rule" statement for a given command.
|
|
|
| Returns the name of the new rule, and a copy of |args| with variables
|
| @@ -1564,7 +1569,8 @@ class NinjaWriter(object):
|
| # GYP rules/actions express being no-ops by not touching their outputs.
|
| # Avoid executing downstream dependencies in this case by specifying
|
| # restat=1 to ninja.
|
| - self.ninja.rule(rule_name, command, description, restat=True, pool=pool,
|
| + self.ninja.rule(rule_name, command, description, depfile=depfile,
|
| + restat=True, pool=pool,
|
| rspfile=rspfile, rspfile_content=rspfile_content)
|
| self.ninja.newline()
|
|
|
|
|