| # Copyright 2025 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/dist/distribution_manifest.gni") |
| |
| # This rolls up resource() equivalent metadata from $deps and applies $prefix. |
| # |
| # Rolling up from here will install those files under that prefix. |
| # |
| # Parameters |
| # |
| # * prefix |
| # - Required: See distribution_manifest(). |
| # - Type: string |
| # |
| # * deps, testonly, visibility |
| # - Optional: See distribution_manifest(). |
| # |
| template("distribution_manifest_prefix") { |
| distribution_manifest(target_name) { |
| forward_variables_from(invoker, |
| [ |
| "deps", |
| "prefix", |
| "testonly", |
| "visibility", |
| ]) |
| outputs = [ "$target_gen_dir/$target_name.json" ] |
| metadata = { |
| distribution_entries_files = [ |
| { |
| file = rebase_path(outputs[0], root_build_dir) |
| label = get_label_info(":$target_name", "label_with_toolchain") |
| }, |
| ] |
| } |
| } |
| } |