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

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

Issue 2564023002: Handle storyboards in GN. (Closed)
Patch Set: nib is the output_extension Created 4 years 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') | build/config/mac/compile_ib_files.py » ('j') | 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 92e73a862f66a6b67320a739ae22dd7088e3da46..341c7508a46682cc5b1cd2eaea04928264571524 100644
--- a/build/config/mac/base_rules.gni
+++ b/build/config/mac/base_rules.gni
@@ -202,7 +202,7 @@ template("info_plist") {
}
}
-# Template to combile .xib or .storyboard files.
+# Template to compile .xib and .storyboard files.
#
# Arguments
#
@@ -211,7 +211,7 @@ template("info_plist") {
#
# ibtool_flags:
# (optional) list of string, additional flags to pass to the ibtool
-template("compile_xibs") {
+template("compile_ib_files") {
action_foreach(target_name) {
forward_variables_from(invoker,
[
@@ -219,23 +219,28 @@ template("compile_xibs") {
"visibility",
])
assert(defined(invoker.sources),
- "Sources must be specified for $target_name")
+ "sources must be specified for $target_name")
+ assert(defined(invoker.output_extension),
+ "output_extension must be specified for $target_name")
ibtool_flags = []
if (defined(invoker.ibtool_flags)) {
ibtool_flags = invoker.ibtool_flags
}
- script = "//build/config/mac/compile_xib.py"
+ _output_extension = invoker.output_extension
+
+ script = "//build/config/mac/compile_ib_files.py"
sources = invoker.sources
outputs = [
- "$target_gen_dir/$target_name/{{source_name_part}}.nib",
+ "$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
]
args = [
"--input",
"{{source}}",
"--output",
- rebase_path("$target_gen_dir/$target_name/{{source_name_part}}.nib"),
+ rebase_path(
+ "$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension"),
]
if (!use_system_xcode) {
args += [
« no previous file with comments | « build/config/ios/rules.gni ('k') | build/config/mac/compile_ib_files.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698