Commit b94b4b17 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

[ios] Allow the additional plist to be generated

Some of the additional plist needs to be generated based on some
build configuration, so add a new variable to control the list of
targets to add as dependency of the tweak_info_plist.

This variable will be overridden downstream with the list of
targets needed to generate the plist files.

Bug: 1083995
Change-Id: I73d9caad5e38e94c7c2fea43d6b59f97aec6e5dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207532Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770088}
parent c965c3e4
......@@ -31,7 +31,11 @@ template("tweak_info_plist") {
_deps = [ ":" + target_name + "_merge_plist" ]
action(target_name + "_merge_plist") {
forward_variables_from(invoker, [ "testonly" ])
forward_variables_from(invoker,
[
"testonly",
"deps",
])
script = "//build/config/mac/plist_util.py"
sources = invoker.info_plists
outputs = [ _source_name ]
......@@ -47,6 +51,9 @@ template("tweak_info_plist") {
_source_name = invoker.info_plist
_deps = []
if (defined(invoker.deps)) {
_deps += invoker.deps
}
}
action(target_name) {
......
......@@ -37,6 +37,10 @@ declare_args() {
# List of plist templates to merge when generating chrome Info.plist.
ios_chrome_info_plist_additions = []
# List of targets used to generate the plist listed in
# ios_chrome_info_plist_additions variable (if any).
ios_chrome_info_plist_addition_targets = []
# List of plist templates to merge when generating chrome entitlements.
ios_chrome_entitlements_additions = []
......
......@@ -95,6 +95,12 @@ tweak_info_plist("info_plist") {
} else if (ios_enable_scene_startup) {
info_plists += [ "resources/MultiWindowDisabled+Info.plist" ]
}
if (ios_chrome_info_plist_addition_targets != []) {
if (!defined(deps)) {
deps = []
}
deps += ios_chrome_info_plist_addition_targets
}
args = [
"--breakpad=$breakpad_enabled_as_int",
"--branding=$chromium_short_name",
......
......@@ -73,6 +73,12 @@ template("chrome_ios_eg_test") {
if (ios_chrome_info_plist_additions != []) {
info_plists += ios_chrome_info_plist_additions
}
if (ios_chrome_info_plist_addition_targets != []) {
if (!defined(deps)) {
deps = []
}
deps += ios_chrome_info_plist_addition_targets
}
if (defined(invoker.extra_info_plists)) {
info_plists += invoker.extra_info_plists
}
......
......@@ -33,6 +33,12 @@ template("chrome_ios_eg2_test_app_host") {
if (ios_chrome_info_plist_additions != []) {
info_plists += ios_chrome_info_plist_additions
}
if (ios_chrome_info_plist_addition_targets != []) {
if (!defined(deps)) {
deps = []
}
deps += ios_chrome_info_plist_addition_targets
}
if (defined(invoker.extra_info_plists)) {
info_plists += invoker.extra_info_plists
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment