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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/ninja_create_bundle_target_writer.h" 5 #include "tools/gn/ninja_create_bundle_target_writer.h"
6 6
7 #include "tools/gn/filesystem_utils.h" 7 #include "tools/gn/filesystem_utils.h"
8 #include "tools/gn/ninja_utils.h" 8 #include "tools/gn/ninja_utils.h"
9 #include "tools/gn/output_file.h" 9 #include "tools/gn/output_file.h"
10 #include "tools/gn/scheduler.h" 10 #include "tools/gn/scheduler.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 out_ << std::endl; 110 out_ << std::endl;
111 } 111 }
112 112
113 out_ << std::endl; 113 out_ << std::endl;
114 114
115 std::vector<OutputFile> order_only_deps; 115 std::vector<OutputFile> order_only_deps;
116 for (const auto& pair : target_->data_deps()) 116 for (const auto& pair : target_->data_deps())
117 order_only_deps.push_back(pair.ptr->dependency_output_file()); 117 order_only_deps.push_back(pair.ptr->dependency_output_file());
118 WriteStampForTarget(output_files, order_only_deps); 118 WriteStampForTarget(output_files, order_only_deps);
119
120 // Write a phony target for the outer bundle directory. This allows other
121 // targets to treat the entire bundle as a single unit, even though it is
122 // a directory, so that it can be depended upon as a discrete build edge.
123 out_ << "build ";
124 path_output_.WriteFile(
125 out_,
126 OutputFile(settings_->build_settings(),
127 target_->bundle_data().GetBundleRootDirOutput(settings_)));
128 out_ << ": phony " << target_->dependency_output_file().value();
129 out_ << std::endl;
119 } 130 }
OLDNEW
« 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