diff options
author | 2016-04-26 13:41:20 +0000 | |
---|---|---|
committer | 2016-04-26 14:40:25 +0000 | |
commit | 0a31eb9ecd7c001147a963bea706d2e58c277f2e (patch) | |
tree | b1391532aea6d52aee311efb1104f393c5b3af90 /site | |
parent | ddcc00098a77c51c16d195fb67166300969fcf60 (diff) |
Add documentation on how to Bazel querying for a macro
This change also creates a "example queries" section. The "example
queries" section is a palce where sample queries that are commonly used
can be placed.
--
Change-Id: If68d54c5c6de61930ff5f5c75746343400c89bc0
Reviewed-on: https://bazel-review.googlesource.com/#/c/3161/3
MOS_MIGRATED_REVID=120808217
Diffstat (limited to 'site')
-rw-r--r-- | site/docs/query.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/site/docs/query.html b/site/docs/query.html index 55dc38854d..28277400d2 100644 --- a/site/docs/query.html +++ b/site/docs/query.html @@ -1130,6 +1130,11 @@ genrule( least one value in the <code>data</code> attribute (every label is at least 3 characters long due to the <code>//</code> and <code>:</code>). </p> +<pre>attr("generator_function", "your_skylark_macro_name", //...)</pre> +<p> + Rules created by a macro have an implicit field on them called "generator_function". If you want + to query for a macro, this is one way to achieve that. +</p> <h3 id="visible">Rule visibility filtering: visible</h3> <pre>expr ::= visible(<var>expr</var>, <var>expr</var>) </pre> |