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

Unified Diff: third_party/google_input_tools/closure.gni

Issue 676423003: Add build target for inputview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 | « third_party/google_input_tools/builder.py ('k') | third_party/google_input_tools/inputview.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/google_input_tools/closure.gni
diff --git a/third_party/google_input_tools/closure.gni b/third_party/google_input_tools/closure.gni
new file mode 100644
index 0000000000000000000000000000000000000000..526dbd03fc1ee236ce0cdd219f6051f799d83746
--- /dev/null
+++ b/third_party/google_input_tools/closure.gni
@@ -0,0 +1,36 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+template("build_closure") {
+ assert(defined(invoker.sources))
+ assert(defined(invoker.target))
+ action_name = target_name + "_js_gen"
+ action(action_name) {
+ script = "//third_party/google_input_tools/builder.py"
+ sources = invoker.sources
+ outputs = [invoker.target]
+ args = ["--target",
+ rebase_path(invoker.target, root_build_dir)]
+ if(defined(invoker.json_file)) {
+ # Optionally parse list of sources from a json file. Useful when the list
+ # is sufficiently long to create problems with length restrictions on the
+ # command line.
+ assert(defined(invoker.json_sources))
+ args += ["--json_file",
+ rebase_path(invoker.json_file, root_build_dir),
+ "--json_sources",
+ invoker.json_sources]
+ } else {
+ # If the number of source files is short, they can be directly extracted
+ # from the command line.
+ args += ["--sources"] + sources
+ }
+ if(defined(invoker.path)) {
+ args += ["--path", invoker.path]
+ }
+ }
+ group(target_name) {
+ deps = [ ":$action_name" ]
+ }
+}
« no previous file with comments | « third_party/google_input_tools/builder.py ('k') | third_party/google_input_tools/inputview.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698