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

Unified Diff: build/config/mac/base_rules.gni

Issue 1964393002: [GN] New template convert_plist to convert a plist file to another format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « build/config/ios/rules.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/mac/base_rules.gni
diff --git a/build/config/mac/base_rules.gni b/build/config/mac/base_rules.gni
index 4da6ea28924212f1fd7f1bd4d2148718791cf8da..aa42ed65f1cfe515951cf033dfdd3e45b43c0ed5 100644
--- a/build/config/mac/base_rules.gni
+++ b/build/config/mac/base_rules.gni
@@ -12,6 +12,49 @@ if (is_mac) {
import("//build/config/ios/ios_sdk.gni")
}
+# 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 `plutil -convert` the plist to.
+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/config/mac/xcrun.py"
+ sources = [
+ invoker.source,
+ ]
+ outputs = [
+ invoker.output,
+ ]
+ args = [
+ "plutil",
+ "-convert",
+ invoker.format,
+ "-o",
+ rebase_path(invoker.output, root_out_dir),
+ rebase_path(invoker.source, root_out_dir),
+ ]
+ }
+}
+
# The base template used to generate Info.plist files for iOS and Mac apps and
# frameworks.
#
@@ -66,8 +109,9 @@ template("info_plist") {
args = [ "@{{response_file_name}}" ]
forward_variables_from(invoker,
[
- "testonly",
"deps",
+ "testonly",
+ "visibility",
])
}
}
« no previous file with comments | « build/config/ios/rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698