blob: 97aa96f1cc6cb66d3005d775c479c9b3699c1c12 [file] [log] [blame]
# Copyright 2020 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/resource.gni")
# Exposes a config for devmgr as a resource that's consumable by a ZBI target.
#
# Parameters
#
# label (required)
# GN label of the target producing the config file.
#
# testonly
# See `gn help`.
template("devmgr_config") {
devmgr_config_label = invoker.label
devmgr_config_out_dir = get_label_info(devmgr_config_label, "target_out_dir")
devmgr_config_name = get_label_info(devmgr_config_label, "name")
devmgr_config_file = "$devmgr_config_out_dir/$devmgr_config_name"
resource(target_name) {
forward_variables_from(invoker, [ "testonly" ])
deps = [ devmgr_config_label ]
sources = [ devmgr_config_file ]
outputs = [ "config/devmgr" ]
}
}