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

Unified Diff: tools/gn/ninja_create_bundle_target_writer.cc

Issue 1892243002: Write a phony target for the top-level directory of a create_bundle target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 8 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 | « tools/gn/bundle_data.cc ('k') | tools/gn/ninja_create_bundle_target_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_create_bundle_target_writer.cc
diff --git a/tools/gn/ninja_create_bundle_target_writer.cc b/tools/gn/ninja_create_bundle_target_writer.cc
index d85f2401ae52209051ba4444d7a6aec51c73a419..84da2ff2d4bc985a58511a8df4ae1e163d6e22e6 100644
--- a/tools/gn/ninja_create_bundle_target_writer.cc
+++ b/tools/gn/ninja_create_bundle_target_writer.cc
@@ -116,4 +116,15 @@ void NinjaCreateBundleTargetWriter::Run() {
for (const auto& pair : target_->data_deps())
order_only_deps.push_back(pair.ptr->dependency_output_file());
WriteStampForTarget(output_files, order_only_deps);
+
+ // Write a phony target for the outer bundle directory. This allows other
+ // targets to treat the entire bundle as a single unit, even though it is
+ // a directory, so that it can be depended upon as a discrete build edge.
+ out_ << "build ";
+ path_output_.WriteFile(
+ out_,
+ OutputFile(settings_->build_settings(),
+ target_->bundle_data().GetBundleRootDirOutput(settings_)));
+ out_ << ": phony " << target_->dependency_output_file().value();
+ out_ << std::endl;
}
« no previous file with comments | « tools/gn/bundle_data.cc ('k') | tools/gn/ninja_create_bundle_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698