blob: 2076a1bb4f05b186eef73c968240ee46de7a1b30 [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")
# collect from the transitive closure of package dependencies all blobs into a
# single de-duplicated manfiest file.
#
# Paramters
#
# One of deps, data_deps, or public_deps are required to be non-empty for any
# meaningful operation.
#
# outputs (required)
# [list containing one string] The output location for the manifest.
#
# data_deps (optional)
# deps (optional)
# metadata (optional)
# output_conversion (optional)
# public_deps (optional)
# testonly (optional)
# visibility (optional)
# Same as for any GN `generated_file()` target.
template("collect_blob_manifest") {
list_name = target_name + ".list"
list_path = target_gen_dir + "/" + list_name
package_metadata_list(list_name) {
forward_variables_from(invoker, [
"data_deps",
"deps",
"public_deps",
"testonly",
"data_keys",
])
data_keys = ["blob_manifests"]
outputs = [list_path]
}
action(target_name) {
forward_variables_from(invoker, [
"inputs",
"outputs",
"testonly",
"visibility",
])
assert([outputs[0]] == outputs, "collect_blob_manifest requires exactly one output")
inputs = [list_path]
deps = [":" + list_name]
script = "//build/images/manifest_list_collect_unique_blobs.sh"
args = [
rebase_path(inputs[0], root_build_dir),
rebase_path(outputs[0], root_build_dir),
]
}
}