Add guideline: only use `name` for generated targets' names.
RELNOTES:
None
@@ -133,6 +133,9 @@ For macros that define non-leaf nodes, follow these best practices:
* All other targets defined by a macro should have their names preceded with a
`_`, include the `name` attribute as a prefix, and have restricted
visibility.
+* The `name` should only be used to derive names of targets defined by the
+ macro, and not for anything else. For example, don't use the name to derive
+ a dependency or input file that is not generated by the macro itself.
* All the targets created in the macro should be coupled in some way to the
main target.
* Keep the parameter names in the macro consistent. If a parameter is passed
