-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathconvert_plist.gni
41 lines (38 loc) · 1.21 KB
/
convert_plist.gni
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 2021 The Chromium Authors
# 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.
#
# Arguments
#
# source:
# string, path to the plist file to convert
#
# output:
# string, path to the converted plist, must be under $root_build_dir
#
# format:
# 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")
action(target_name) {
forward_variables_from(invoker,
[
"visibility",
"testonly",
"deps",
])
script = "//build/apple/plist_util.py"
sources = [ invoker.source ]
outputs = [ invoker.output ]
args = [
"merge",
"--format=${invoker.format}",
"-o",
rebase_path(invoker.output, root_build_dir),
rebase_path(invoker.source, root_build_dir),
]
}
}