Skip to content

Commit

Permalink
tools,gyp: don't force build actions with multiple outputs
Browse files Browse the repository at this point in the history
Don't add `force_append` (FORCE_DO_CMD) to the intermediate sentinal.
Adding it makes the action run alway, even when there are no changes.
(refack): AFAICT because `*.intermediate` files don't have build rules.

PR-URL: #23156
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
  • Loading branch information
refack authored and targos committed Oct 3, 2018
1 parent 180099a commit d8cedf5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/gyp/pylib/gyp/generator/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -1758,8 +1758,10 @@ def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
self.WriteLn('%s: %s' % (' '.join(outputs), intermediate))
self.WriteLn('\t%s' % '@:');
self.WriteLn('%s: %s' % ('.INTERMEDIATE', intermediate))
self.WriteLn('%s: %s%s' %
(intermediate, ' '.join(inputs), force_append))
# Don't add `force_append` (FORCE_DO_CMD) to the intermediate sentinal.
# Adding it makes the action run alway, even when there are no changes.
# (refack): AFAICT because `*.intermediate` files don't have build rules.
self.WriteLn('%s: %s' % (intermediate, ' '.join(inputs)))
actions.insert(0, '$(call do_cmd,touch)')

if actions:
Expand Down

0 comments on commit d8cedf5

Please sign in to comment.