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

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

Issue 23606031: GN: Use build directory for CD for scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/secondary/chrome/BUILD.gn ('k') | tools/gn/test_with_scope.h » ('j') | 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 4ecdcaa0770764263e379507fbb8d1bb17e56bf4..22a90ac9bacaca8cdaa8275bf6338f7e40d3fc24 100644
--- a/tools/gn/secondary/tools/grit/grit_rule.gni
+++ b/tools/gn/secondary/tools/grit/grit_rule.gni
@@ -9,17 +9,15 @@ template("grit") {
"Neither \"sources\" nor \"outputs\" can be defined for the grit " +
"template $target_name")
- resource_ids = "$relative_source_root_dir/tools/gritsettings/resource_ids"
- output_dir = "$relative_target_gen_dir"
-
- # Note that this needs to be source-absolute since the current directory will
- # be that of the file invoking the template, not this file.
- grit_info_script = "$relative_source_root_dir/tools/grit/grit_info.py"
+ resource_ids = to_build_path("//tools/gritsettings/resource_ids")
+ output_dir = to_build_path(target_gen_dir)
+ grit_info_script = to_build_path("//tools/grit/grit_info.py")
+ source_path = to_build_path(source)
grit_inputs = exec_script(grit_info_script,
- [ "--inputs", source, "-f", resource_ids], "list lines")
+ [ "--inputs", source_path, "-f", resource_ids], "list lines")
grit_outputs = exec_script(grit_info_script,
- [ "--outputs", "$output_dir", source, "-f", resource_ids ],
+ [ "--outputs", "$output_dir", source_path, "-f", resource_ids ],
"list lines")
# The current grit setup makes an file in $target_gen_dir/grit/foo.h that
@@ -33,15 +31,15 @@ template("grit") {
grit_custom_target = target_name + "_grit"
custom(grit_custom_target) {
- script = "$relative_source_root_dir/tools/grit/grit.py"
+ script = "//tools/grit/grit.py"
source_prereqs = grit_inputs
outputs = grit_outputs
# TODO(brettw) grit_defines.
args = [
- "-i", source, "build",
+ "-i", source_path, "build",
"-f", resource_ids,
- "-o", relative_target_gen_dir,
+ "-o", output_dir,
]
}
« no previous file with comments | « tools/gn/secondary/chrome/BUILD.gn ('k') | tools/gn/test_with_scope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698