Shorthand for including an output file of a genrule directory as a src
If you have a genrule that creates a directory with several files, it's a bit of a pain to write another genrule
rule for each (expected) output, just to be able to pass it to *_library (java, python, etc). It would be nice to allow you to somehow specify this in the sources - maybe via flavors (although it is a bit hackish)? e.g.
genrule(
name='gen_my_thing',
out='things',
cmd='$(exe :my_custom_generator) $SRCDIR $OUT',
srcs=glob(['File1.java', 'File2.java']),
)
java_library(
name='lib',
srcs=[
':gen_my_thing#lib_output/File1Out.java',
':gen_my_thing#lib_output/File2Out.java',
]
)