| # Copyright 2022 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("//tools/check-licenses/build/license_data.gni") |
| |
| # 1) Add this target to the visibility of //build:non_hermetic_deps |
| # Currently, check-licenses is not hermetic. |
| # Any BUILD.gn file that uses the license_data rule must exist in the non_hermetic_deps allowlist. |
| # |
| # 2) fx set <product>.<board> --with //tools/check-licenses/build:example |
| # |
| # 3) fx build tools/check-licenses/build:example |
| |
| license_data("example") { |
| # Run the tool against itself |
| # Default: target = "//:default" |
| target = "//tools/check-licenses" |
| |
| # Move the output to a different directory |
| # Default: out_dir = "$target_out_dir/check-licenses" |
| out_dir = "$target_out_dir/move_location" |
| |
| # Final output file: |
| # $target_out_dir/move_location/out/results.spdx.json |
| # e.g. |
| # $FUCHSIA_OUT_DIR/tools/check-licenses/build/move_location/results.spdx.json |
| } |