blob: 62377d72dc270071ceb7da4a5e82748c40a34f3e [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 = "${target_name}.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,
[
"package_name",
"testonly",
"visibility",
])
extra = [ shell_commands_manifest_path ]
deps = [ ":$shell_commands_manifest" ]
}
}