1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 template("build_closure") {
6 assert(defined(invoker.sources))
7 assert(defined(invoker.target))
8 action_name = target_name + "_js_gen"
10 script = "//third_party/google_input_tools/builder.py"
11 sources = invoker.sources
17 rebase_path(invoker.target, root_build_dir),
19 if (defined(invoker.json_file)) {
20 # Optionally parse list of sources from a json file. Useful when the list
21 # is sufficiently long to create problems with length restrictions on the
23 assert(defined(invoker.json_sources))
26 rebase_path(invoker.json_file, root_build_dir),
31 # If the number of source files is short, they can be directly extracted
32 # from the command line.
33 args += [ "--sources" ] + sources
35 if (defined(invoker.path)) {