Inside a .bzl
file,
I specify a program to generate some code.
It looks something like this:
def generate_code():
native.genrule(
name = "foo",
outs = ["file.hpp"],
tools = ["//path/to:tool"],
cmd = $(location path/to:tool) $(@D)
)
This works fine,
however the problem is that the tool might generate more files than are specified in outs
.
I'm trying to find a way to either have bazel stop the build if more files are generated than specified, or to have the outs automatically be everything generated.