genrule:
.bzl file, and call the file miniature.bzl:
-
By convention, macros have a
nameargument, just like rules. - To document the behavior of a macro, use docstring like in Python.
-
To call a
genrule, or any other native rule, usenative.. -
Use
**kwargsto forward the extra arguments to the underlyinggenrule(it works just like in Python). This is useful, so that a user can use standard attributes likevisibility, ortags.
BUILD file: