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

Unified Diff: tools/gn/secondary/tools/grit/grit_rule.gni

Issue 212843007: Update .gn files to use new template syntax. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now with new shas Created 6 years, 9 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/bin/win/gn.exe.sha1 ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/secondary/tools/grit/grit_rule.gni
diff --git a/tools/gn/secondary/tools/grit/grit_rule.gni b/tools/gn/secondary/tools/grit/grit_rule.gni
index 6dc7f70dc05fcf8886990063fe82b962cb9627bc..d658cbc5ae2df3c063da1eafe9c8bff90510de7b 100644
--- a/tools/gn/secondary/tools/grit/grit_rule.gni
+++ b/tools/gn/secondary/tools/grit/grit_rule.gni
@@ -13,9 +13,9 @@
# # files.
# }
template("grit") {
- assert(defined(source),
+ assert(defined(invoker.source),
"\"source\" must be defined for the grit template $target_name")
- assert(!defined(sources) && !defined(outputs),
+ assert(!defined(invoker.sources) && !defined(invoker.outputs),
"Neither \"sources\" nor \"outputs\" can be defined for the grit " +
"template $target_name")
@@ -26,9 +26,11 @@ template("grit") {
resource_ids =
rebase_path("//tools/gritsettings/resource_ids", root_build_dir)
output_dir = rebase_path(target_gen_dir, root_build_dir)
- source_path = rebase_path(source, root_build_dir)
+ source_path = rebase_path(invoker.source, root_build_dir)
- if (!defined(grit_flags)) {
+ if (defined(invoker.grit_flags)) {
+ grit_flags = invoker.grit_flags
+ } else {
grit_flags = [] # These are optional so default to empty list.
}
« no previous file with comments | « tools/gn/bin/win/gn.exe.sha1 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698