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

Unified Diff: ios/chrome/tools/strings/generate_localizable_strings.gni

Issue 2026493002: [GN] Convert generate_localizable_strings.gni to use compiled_action.gni. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | ios/chrome/tools/strings/generate_localizable_strings.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/tools/strings/generate_localizable_strings.gni
diff --git a/ios/chrome/tools/strings/generate_localizable_strings.gni b/ios/chrome/tools/strings/generate_localizable_strings.gni
index 2606e58c131a9eb6daaad7cd4184dbac2610c7af..dd85a2d1f72a229ef16a1d5b4c33e94844e1825f 100644
--- a/ios/chrome/tools/strings/generate_localizable_strings.gni
+++ b/ios/chrome/tools/strings/generate_localizable_strings.gni
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/compiled_action.gni")
+
# Help template to define a data_bundle with localized strings for use by
# the iOS system from packed locale.pak files.
#
@@ -37,11 +39,6 @@ template("generate_localizable_strings") {
assert(defined(invoker.packed_locales),
"packed_locales needs to be defined for ${target_name}")
- _tool_target = "//ios/chrome/tools/strings" +
- ":generate_localizable_strings(${host_toolchain})"
- _tool_path = get_label_info(_tool_target, "root_out_dir") +
- "/generate_localizable_strings"
-
_target_name = target_name
_bundle_targets = []
@@ -65,33 +62,35 @@ template("generate_localizable_strings") {
}
}
- action("${_target_name}_generate") {
+ compiled_action("${_target_name}_generate") {
forward_variables_from(invoker, [ "testonly" ])
visibility = _bundle_targets
- script = "//ios/chrome/tools/strings/generate_localizable_strings.py"
- deps = invoker.deps + [ _tool_target ]
+ deps = invoker.deps
+ tool = "//ios/chrome/tools/strings:generate_localizable_strings"
outputs = []
- sources = [
+ inputs = [
invoker.config_file,
]
foreach(locale, invoker.packed_locales) {
- sources += [ "${invoker.datapack_dir}/${locale}.lproj/locale.pak" ]
+ inputs += [ "${invoker.datapack_dir}/${locale}.lproj/locale.pak" ]
foreach(filename, invoker.output_filenames) {
outputs += [ "${target_gen_dir}/${locale}.lproj/$filename" ]
}
}
- args = rebase_path([
- _tool_path,
- invoker.config_file,
- root_gen_dir,
- invoker.datapack_dir,
- target_gen_dir,
- ],
- root_out_dir) + invoker.packed_locales
+ args = [
+ "-c",
+ rebase_path(invoker.config_file, root_build_dir),
+ "-I",
+ rebase_path(root_gen_dir, root_build_dir),
+ "-p",
+ rebase_path(invoker.datapack_dir, root_build_dir),
+ "-o",
+ rebase_path(target_gen_dir, root_build_dir),
+ ] + invoker.packed_locales
}
group(_target_name) {
« no previous file with comments | « no previous file | ios/chrome/tools/strings/generate_localizable_strings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698