| # 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/config/fuchsia/zircon_images.gni") |
| import("bootsvc.gni") |
| |
| # Transforms a Zircon manifest so that its paths are relative to this build's |
| # root directory. |
| template("rebased_manifest") { |
| assert(defined(invoker.manifest)) |
| |
| action(target_name) { |
| script = "//build/images/manifest.py" |
| |
| inputs = [ |
| "$zircon_root_build_dir/${invoker.manifest}", |
| ] |
| |
| outputs = [ |
| "$target_gen_dir/$target_name.rebased.manifest", |
| ] |
| |
| args = [ |
| "--output", |
| rebase_path(outputs[0]), |
| "--unique", |
| "--cwd", |
| rebase_path(zircon_root_build_dir, root_build_dir), |
| "--manifest", |
| rebase_path(inputs[0]), |
| ] |
| } |
| } |
| |
| foreach(flavor, bootsvc_flavors) { |
| rebased_manifest(flavor.name) { |
| manifest = flavor.path |
| } |
| } |