Chromium Code Reviews| Index: build/secondary/tools/grit/grit_rule.gni |
| diff --git a/build/secondary/tools/grit/grit_rule.gni b/build/secondary/tools/grit/grit_rule.gni |
| index 626fd745d8a9dc505b59cd4a10ad7951de1def18..1b2e12e4ddc73c8cfd80f800a92c4bec1d5ad9bc 100644 |
| --- a/build/secondary/tools/grit/grit_rule.gni |
| +++ b/build/secondary/tools/grit/grit_rule.gni |
| @@ -364,8 +364,19 @@ template("grit") { |
| action(grit_custom_target) { |
| script = "//tools/grit/grit.py" |
| inputs = grit_inputs |
| - outputs = grit_outputs |
| - depfile = "$output_dir/${grit_output_name}.d" |
| + depend_on_stamp = |
|
cjhopman
2015/03/14 00:37:45
Do we need to support not depending on a stamp?
knn
2015/03/16 10:53:42
This only so that the build does not break due to
cjhopman
2015/03/16 20:13:46
But, we can't set depend_on_stamp for any target u
|
| + defined(invoker.depend_on_stamp) && invoker.depend_on_stamp |
| + if (depend_on_stamp) { |
| + # Need this for migrating existing targets without clobbering. |
| + depfile = "$output_dir/${grit_output_name}_stamp.d" |
| + outputs = [ |
| + "${depfile}.stamp", |
| + ] |
| + } else { |
| + depfile = "$output_dir/${grit_output_name}.d" |
| + outputs = [] |
| + } |
| + outputs += grit_outputs |
| args = [ |
| "-i", |
| @@ -379,14 +390,18 @@ template("grit") { |
| ] |
| } |
| args += [ |
| - "-o", |
| - rebased_output_dir, |
| - "--depdir", |
| - ".", |
| - "--depfile", |
| - rebase_path(depfile, root_build_dir), |
| - "--write-only-new=1", |
| - ] + grit_defines |
| + "-o", |
| + rebased_output_dir, |
| + "--depdir", |
| + ".", |
| + "--depfile", |
| + rebase_path(depfile, root_build_dir), |
| + "--write-only-new=1", |
| + ] |
| + if (depend_on_stamp) { |
| + args += [ "--depend-on-stamp" ] |
| + } |
| + args += grit_defines |
| # Add extra defines with -D flags. |
| if (defined(invoker.defines)) { |