blob: 43716f1b482ac543cfbee447e03c01df9965d1b7 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/package.gni")
# Produce a package that collects all binaries entries produced by packages
# declared in deps, into a new package.
#
# Paramters
# deps (optional)
# public_deps (optional)
# data_deps (optional)
# testonly (optional)
# Usual GN meanings.
template("shell_commands") {
shell_commands_manifest = "shell-commands-extra.manifest"
shell_commands_manifest_path = target_gen_dir + "/" + shell_commands_manifest
generated_file(shell_commands_manifest) {
forward_variables_from(invoker,
[
"deps",
"public_deps",
"data_deps",
"testonly",
])
# This contract is known to package.gni.
data_keys = [ "shell_binary_entries" ]
walk_keys = [ "shell_binary_barrier" ]
outputs = [
shell_commands_manifest_path,
]
}
package(target_name) {
metadata = {
shell_binary_barrier = []
}
forward_variables_from(invoker,
[
"testonly",
"visibility",
])
extra = [ shell_commands_manifest_path ]
deps = [
":$shell_commands_manifest",
]
}
}