Chromium Code Reviews| Index: tools/gn/ninja_copy_target_writer.cc |
| diff --git a/tools/gn/ninja_copy_target_writer.cc b/tools/gn/ninja_copy_target_writer.cc |
| index ca3485240854cd8147600fb838e36c19918df64a..57dc8778f40fda1ff3ab4c48f306160836440853 100644 |
| --- a/tools/gn/ninja_copy_target_writer.cc |
| +++ b/tools/gn/ninja_copy_target_writer.cc |
| @@ -71,6 +71,9 @@ void NinjaCopyTargetWriter::WriteCopyRules( |
| GetNinjaRulePrefixForToolchain(settings_) + |
| Toolchain::ToolTypeToName(Toolchain::TYPE_COPY); |
| + OutputFile input_dep = |
| + WriteInputDepsStampAndGetDep(std::vector<const Target*>()); |
|
Dirk Pranke
2014/10/30 02:22:19
I just stole this from ninja_binary_target_writer;
|
| + |
| // Note that we don't write implicit deps for copy steps. "copy" only |
| // depends on the output files themselves, rather than having includes |
| // (the possibility of generated #includes is the main reason for implicit |
| @@ -104,6 +107,10 @@ void NinjaCopyTargetWriter::WriteCopyRules( |
| path_output_.WriteFile(out_, output_file); |
| out_ << ": " << tool_name << " "; |
| path_output_.WriteFile(out_, input_file); |
| + if (!input_dep.value().empty()) { |
| + out_ << " || "; |
| + path_output_.WriteFile(out_, input_dep); |
| + } |
| out_ << std::endl; |
| } |
| } |