| # Copyright 2021 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. |
| # Convert plist file to given format. |
| # string, path to the plist file to convert |
| # string, path to the converted plist, must be under $root_build_dir |
| # string, the format to convert the plist to. Either "binary1" or "xml1". |
| template("convert_plist") { |
| assert(defined(invoker.source), "source must be defined for $target_name") |
| assert(defined(invoker.output), "output must be defined for $target_name") |
| assert(defined(invoker.format), "format must be defined for $target_name") |
| forward_variables_from(invoker, |
| script = "//build/apple/plist_util.py" |
| sources = [ invoker.source ] |
| outputs = [ invoker.output ] |
| "--format=${invoker.format}", |
| rebase_path(invoker.output, root_build_dir), |
| rebase_path(invoker.source, root_build_dir), |