Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: tools/gn/ninja_copy_target_writer.cc

Issue 693443002: Make the gn copy() tool honor dependencies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698