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

Unified Diff: tools/gn/target_generator.cc

Issue 333243004: Rename GN source_prereqs to inputs, enhance "desc" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/target_generator.h ('k') | tools/gn/variables.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target_generator.cc
diff --git a/tools/gn/target_generator.cc b/tools/gn/target_generator.cc
index 02ed8b74cc6e202528a4eccd3a83aa7e02a4eb26..084c587c9838ed0b5e7b5d513dcecf0fb6db3887 100644
--- a/tools/gn/target_generator.cc
+++ b/tools/gn/target_generator.cc
@@ -160,16 +160,23 @@ void TargetGenerator::FillPublic() {
target_->public_headers().swap(dest_public);
}
-void TargetGenerator::FillSourcePrereqs() {
- const Value* value = scope_->GetValue(variables::kSourcePrereqs, true);
- if (!value)
- return;
+void TargetGenerator::FillInputs() {
+ const Value* value = scope_->GetValue(variables::kInputs, true);
+ if (!value) {
+ // Older versions used "source_prereqs". Allow use of this variable until
+ // all callers are updated.
+ // TODO(brettw) remove this eventually.
+ value = scope_->GetValue("source_prereqs", true);
+
+ if (!value)
+ return;
+ }
- Target::FileList dest_reqs;
+ Target::FileList dest_inputs;
if (!ExtractListOfRelativeFiles(scope_->settings()->build_settings(), *value,
- scope_->GetSourceDir(), &dest_reqs, err_))
+ scope_->GetSourceDir(), &dest_inputs, err_))
return;
- target_->source_prereqs().swap(dest_reqs);
+ target_->inputs().swap(dest_inputs);
}
void TargetGenerator::FillConfigs() {
« no previous file with comments | « tools/gn/target_generator.h ('k') | tools/gn/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698