blob: f0fc8cc8e118743f0394d95910c5136bf4d054fb [file] [log] [blame] [edit]
# 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.
# A helper rule to write a file indicating that a target is a CTF target.
#
# This rule should not be called directly, but through cts_* other build rules.
template("write_ctf_file") {
ctf_extension = "this_is_ctf"
name = string_replace(invoker.target_name, "_ctf_file", "")
target_dir = rebase_path(get_label_info(":$name", "dir"), "//")
generated_file(target_name) {
outputs = [ "${root_build_dir}/ctf/${target_dir}/${name}.${ctf_extension}" ]
contents = true
}
}