chromium/third_party/google_input_tools/closure.gni

# Copyright 2014 The Chromium Authors
# 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(target_name) {
    script = "//third_party/google_input_tools/builder.py"
    sources = invoker.sources
    outputs = [ invoker.target ]
    response_file_contents = sources
    args = [
      "--target",
      rebase_path(invoker.target, root_build_dir),
      "--sources-list",
      "{{response_file_name}}",
    ]
    if (defined(invoker.path)) {
      args += [
        "--path",
        rebase_path(invoker.path, root_build_dir),
      ]
    }
  }
}