aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar David Chen <dzc@google.com>2016-05-19 22:01:19 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-05-20 14:41:16 +0000
commitf62db46b49fb2016ca4dad300374ddbbe5ffee43 (patch)
treee08948a5848e719129c99824a5e2c9fa82d979cd /src
parent35c1aa8cdd6057acdc0e7035ec766f616052c127 (diff)
Update Bazel native rule documentation to use new ${link} syntax.
-- MOS_MIGRATED_REVID=122772973
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/config/ConfigRuleClasses.java8
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidBinaryRule.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelActionListenerRule.java11
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelExtraActionRule.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelFilegroupRule.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java33
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaBinaryRule.java10
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaImportRule.java10
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaLibraryRule.java8
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaPluginRule.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaTestRule.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyLibraryRule.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyRuleClasses.java18
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyTestRule.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShLibraryRule.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShTestRule.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/HttpArchiveRule.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/MavenJarRule.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java9
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidRuleClasses.java8
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java12
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/repository/LocalRepositoryRule.java4
24 files changed, 93 insertions, 89 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigRuleClasses.java b/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigRuleClasses.java
index 47e1d64c41..75ea7c51a2 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigRuleClasses.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigRuleClasses.java
@@ -207,8 +207,8 @@ public class ConfigRuleClasses {
<p>
Matches an expected configuration state (expressed as Blaze flags) for the purpose of triggering
- configurable attributes. See <a href="functions.html#select">select</a> for how to consume this
- rule and <a href="common-definitions.html#configurable-attributes">
+ configurable attributes. See <a href="${link select}">select</a> for how to consume this
+ rule and <a href="${link common-definitions#configurable-attributes}">
Configurable attributes</a> for an overview of the general feature.
<h4 id="config_setting_examples">Examples</h4>
@@ -242,7 +242,7 @@ config_setting(
<h4 id="config_setting_notes">Notes</h4>
-<p>See <a href="functions.html#select">select</a> for policies on what happens depending on how
+<p>See <a href="${link select}">select</a> for policies on what happens depending on how
many rules match an invocation.
</p>
@@ -254,7 +254,7 @@ config_setting(
<p>The currently endorsed method for creating custom conditions that can't be expressed through
dedicated build flags is through the --define flag. Use this flag with caution: it's not ideal
and only endorsed for lack of a currently better workaround. See the
- <a href="common-definitions.html#configurable-attributes">
+ <a href="${link common-definitions#configurable-attributes}">
Configurable attributes</a> section for more discussion.
</p>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidBinaryRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidBinaryRule.java
index 820e3d2c37..96ef54f1cb 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidBinaryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidBinaryRule.java
@@ -67,15 +67,15 @@ public class BazelAndroidBinaryRule implements RuleDefinition {
the result of running ProGuard on the
<code><var>name</var>_deploy.jar</code>.
This output is only produced if
- <a href="#android_binary.proguard_specs">proguard_specs</a> attribute is
+ <a href="${link android_binary.proguard_specs}">proguard_specs</a> attribute is
specified.
</li>
<li><code><var>name</var>_proguard.map</code>: A mapping file result of
running ProGuard on the <code><var>name</var>_deploy.jar</code>.
This output is only produced if
- <a href="#android_binary.proguard_specs">proguard_specs</a> attribute is
+ <a href="${link android_binary.proguard_specs}">proguard_specs</a> attribute is
specified and
- <a href="#android_binary.proguard_generate_mapping">proguard_generate_mapping</a>
+ <a href="${link android_binary.proguard_generate_mapping}">proguard_generate_mapping</a>
is set.
</li>
</ul>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelActionListenerRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelActionListenerRule.java
index a7c9fa69b3..8961a7c51f 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelActionListenerRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelActionListenerRule.java
@@ -41,7 +41,7 @@ public final class BazelActionListenerRule implements RuleDefinition {
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr("mnemonics", STRING_LIST).mandatory())
/*<!-- #BLAZE_RULE(action_listener).ATTRIBUTE(extra_actions) -->
- A list of <code><a href="#extra_action">extra_action</a></code> targets
+ A list of <code><a href="${link extra_action}">extra_action</a></code> targets
this <code>action_listener</code> should add to the build graph.
E.g. <code>[ "//my/tools:analyzer" ]</code>.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
@@ -75,20 +75,21 @@ public final class BazelActionListenerRule implements RuleDefinition {
<p>
An <code>action_listener</code> rule doesn't produce any output itself.
Instead, it allows tool developers to insert
- <a href="#extra_action"><code>extra_action</code></a>s into the build system,
- by providing a mapping from action to <a href="#extra_action"><code>extra_action</code></a>.
+ <a href="${link extra_action}"><code>extra_action</code></a>s into the build system,
+ by providing a mapping from action to <a href="${link extra_action}"><code>extra_action</code>
+ </a>.
</p>
<p>
This rule's arguments map action mnemonics to
- <a href="#extra_action"><code>extra_action</code></a> rules.
+ <a href="${link extra_action}"><code>extra_action</code></a> rules.
</p>
<p>
By specifying the option <a href="../bazel-user-manual.html#flag--experimental_action_listener">
<code>--experimental_action_listener=&lt;label&gt;</code></a>,
the build will use the specified <code>action_listener</code> to insert
- <a href="#extra_action"><code>extra_action</code></a>s into the build graph.
+ <a href="${link extra_action}"><code>extra_action</code></a>s into the build graph.
</p>
<h4 id="action_listener_example">Example</h4>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelExtraActionRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelExtraActionRule.java
index ea3ce53fa2..6849f6d4af 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelExtraActionRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelExtraActionRule.java
@@ -35,7 +35,7 @@ public final class BazelExtraActionRule implements RuleDefinition {
public RuleClass build(Builder builder, RuleDefinitionEnvironment environment) {
/*<!-- #BLAZE_RULE(extra_action).NAME -->
You may refer to this rule by <code>label</code> in the <code>extra_actions</code> argument
- of <a href="#action_listener"><code> action_listener</code></a> rules.
+ of <a href="${link action_listener}"><code> action_listener</code></a> rules.
<!-- #END_BLAZE_RULE.NAME -->*/
return builder
/*<!-- #BLAZE_RULE(extra_action).ATTRIBUTE(tools) -->
@@ -75,7 +75,7 @@ public final class BazelExtraActionRule implements RuleDefinition {
/*<!-- #BLAZE_RULE(extra_action).ATTRIBUTE(cmd) -->
The command to run.
<p>
- Like <a href="general.html#genrule.cmd">genrule cmd attribute</a> with the following
+ Like <a href="${link genrule.cmd}">genrule cmd attribute</a> with the following
differences:
</p>
<ol>
@@ -136,7 +136,7 @@ public final class BazelExtraActionRule implements RuleDefinition {
</p>
<p>
- See <a href="#action_listener"><code>action_listener</code></a> for details
+ See <a href="${link action_listener}"><code>action_listener</code></a> for details
on how to enable <code>extra_action</code>s in Bazel.
</p>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelFilegroupRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelFilegroupRule.java
index 233d17b666..cc49cab702 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelFilegroupRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelFilegroupRule.java
@@ -38,7 +38,7 @@ public final class BazelFilegroupRule implements RuleDefinition {
/*<!-- #BLAZE_RULE(filegroup).ATTRIBUTE(srcs) -->
The list of targets that are members of the file group.
<p>
- It is common to use the result of a <a href="functions.html#glob">glob</a> expression for
+ It is common to use the result of a <a href="${link glob}">glob</a> expression for
the value
of the <code>srcs</code> attribute. If a rule and a source file with the same name both
exist in the package, the glob will return the outputs of the rule instead of the source
@@ -54,7 +54,7 @@ public final class BazelFilegroupRule implements RuleDefinition {
<code>filegroup</code> is referenced in the <code>data</code> attribute of
another rule its <code>runfiles</code> will be added to the <code>runfiles</code>
of the depending rule. See the <a href="../build-ref.html#data">data dependencies</a>
- section and <a href="common-definitions.html#common.data">general documentation of
+ section and <a href="${link common-definitions#common.data}">general documentation of
<code>data</code></a> for more information about how to depend on and use data files.
</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
@@ -93,7 +93,7 @@ public final class BazelFilegroupRule implements RuleDefinition {
Using <code>filegroup</code> is encouraged instead of referencing directories directly.
The latter is unsound since the build system does not have full knowledge of all files
below the directory, so it may not rebuild when these files change. When combined with
- <a href="functions.html#glob">glob</a>, <code>filegroup</code> can ensure that all files are
+ <a href="${link glob}">glob</a>, <code>filegroup</code> can ensure that all files are
explicitly known to the build system.
</p>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java
index dd0d2b2de1..1555b7d39e 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java
@@ -50,7 +50,8 @@ public final class BazelGenRuleRule implements RuleDefinition {
A list of inputs for this rule, such as source files to process.
<p>
<em>This attributes is not suitable to list tools executed by the <code>cmd</code>; use
- the <a href="#genrule.tools"><code>tools</code></a> attribute for them instead.</em>
+ the <a href="${link genrule.tools}"><code>tools</code></a> attribute for them instead.
+ </em>
</p>
<p>
The build system ensures these prerequisites are built before running the genrule
@@ -98,13 +99,13 @@ public final class BazelGenRuleRule implements RuleDefinition {
/* <!-- #BLAZE_RULE(genrule).ATTRIBUTE(cmd) -->
The command to run.
- Subject to <a href="#location">$(location)</a> and <a href="make-variables.html">"Make"
- variable</a> substitution.
+ Subject to <a href="${link make-variables#location}">$(location)</a> and
+ <a href="${link make-variables}">"Make" variable</a> substitution.
<ol>
<li>
- First <a href="#location">$(location)</a> substitution is applied, replacing all
- occurrences of <code>$(location <i>label</i>)</code> and of <code>$(locations
- <i>label</i>)</code>.
+ First <a href="${link make-variables#location}">$(location)</a> substitution is
+ applied, replacing all occurrences of <code>$(location <i>label</i>)</code> and of
+ <code>$(locations <i>label</i>)</code>.
</li>
<li>
<p>
@@ -115,7 +116,7 @@ public final class BazelGenRuleRule implements RuleDefinition {
</p>
</li>
<li>
- Next, <a href="make-variables.html">"Make" variables</a> are expanded. Note that
+ Next, <a href="${link make-variables}">"Make" variables</a> are expanded. Note that
predefined variables <code>$(JAVA)</code>, <code>$(JAVAC)</code> and
<code>$(JAVABASE)</code> expand under the <i>host</i> configuration, so Java invocations
that run as part of a build step can correctly load shared libraries and other
@@ -128,12 +129,12 @@ public final class BazelGenRuleRule implements RuleDefinition {
</ol>
<p>
The command may refer to binaries that were declared as
- <a href="#genrule.tools"><code>tools</code></a>; it should use a
+ <a href="${link genrule.tools}"><code>tools</code></a>; it should use a
<a href="../build-ref.html#labels">label</a> and <code>$(location)</code> expansion for
this.
- The <a href="make-variables.html#predefined_variables">Predefined "Make" Variables</a> and
- the <a href="make-variables.html#predefined_variables.genrule.cmd">genrule-specific "Make"
- variables</a> are also available for <code>cmd</code>.
+ The <a href="${link make-variables#predefined_variables}">Predefined "Make" Variables</a>
+ and the <a href="${link make-variables#predefined_variables.genrule.cmd}">
+ genrule-specific "Make" variables</a> are also available for <code>cmd</code>.
</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("cmd", STRING).mandatory())
@@ -229,7 +230,7 @@ public final class BazelGenRuleRule implements RuleDefinition {
results, including caching policies and environment variables. Tests generally need to be run
after the build is complete and on the target architecture, whereas genrules are executed during
the build and on the host architecture (the two may be different). If you need a general purpose
- testing rule, use <a href="#sh_test"><code>sh_test</code></a>.
+ testing rule, use <a href="${link sh_test}"><code>sh_test</code></a>.
</p>
<h4>Cross-compilation Considerations</h4>
@@ -255,8 +256,8 @@ public final class BazelGenRuleRule implements RuleDefinition {
For genrules, the build system ensures that dependencies are built appropriately:
<code>srcs</code> are built (if necessary) for the <em>target</em> configuration,
<code>tools</code> are built for the <em>host</em> configuration, and the output is considered to
- be for the <em>target</em> configuration. It also provides <a href="make-variables.html">"Make"
- variables</a> that genrule commands can pass to the corresponding tools.
+ be for the <em>target</em> configuration. It also provides <a href="${link make-variables}">
+ "Make" variables</a> that genrule commands can pass to the corresponding tools.
</p>
<p>
It is intentional that genrule defines no <code>deps</code> attribute: other built-in rules use
@@ -279,7 +280,7 @@ public final class BazelGenRuleRule implements RuleDefinition {
</p>
<p>
<i>JDK & C++ Tooling</i>: to use a tool from the JDK or the C++ compiler suite, the build system
- provides a set of variables to use. See <a href="make-variables.html">"Make" variable</a> for
+ provides a set of variables to use. See <a href="${link make-variables}">"Make" variable</a> for
details.
</p>
@@ -343,7 +344,7 @@ genrule(
</pre>
<p>
- The following example shows how to use a <a href="general.html#filegroup"><code>filegroup</code>
+ The following example shows how to use a <a href="${link filegroup}"><code>filegroup</code>
</a> and the outputs of another <code>genrule</code>. Note that using <code>$(SRCS)</code> instead
of explicit <code>$(location)</code> directives would also work; this example uses the latter for
sake of demonstration.
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaBinaryRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaBinaryRule.java
index 4f01307216..b88a5d7ea1 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaBinaryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaBinaryRule.java
@@ -54,8 +54,8 @@ public final class BazelJavaBinaryRule implements RuleDefinition {
creates a self-contained jar file with a manifest that allows it to be run with the
<code>java -jar</code> command or with the wrapper script's <code>--singlejar</code>
option. Using the wrapper script is preferred to <code>java -jar</code> because it
- also passes the <a href="#java_binary.jvm_flags">JVM flags</a> and the options to load
- native libraries.
+ also passes the <a href="${link java_binary.jvm_flags}">JVM flags</a> and the options
+ to load native libraries.
</p>
<p>
The deploy jar contains all the classes that would be found by a classloader that
@@ -107,9 +107,9 @@ ${IMPLICIT_OUTPUTS}
<p>
A <code>deps</code> attribute is not allowed in a <code>java_binary</code> rule without
- <a href="#java_binary.srcs"><code>srcs</code></a>; such a rule requires a
- <a href="#java_binary.main_class"><code>main_class</code></a> provided by
- <a href="#java_binary.runtime_deps"><code>runtime_deps</code></a>.
+ <a href="${link java_binary.srcs}"><code>srcs</code></a>; such a rule requires a
+ <a href="${link java_binary.main_class}"><code>main_class</code></a> provided by
+ <a href="${link java_binary.runtime_deps}"><code>runtime_deps</code></a>.
</p>
<p>The following code snippet illustrates a common mistake:</p>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaImportRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaImportRule.java
index 4418fc5400..e2929f3ad5 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaImportRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaImportRule.java
@@ -43,7 +43,7 @@ public final class BazelJavaImportRule implements RuleDefinition {
return builder
/* <!-- #BLAZE_RULE(java_import).ATTRIBUTE(deps) -->
The list of other libraries to be linked in to the target.
- See <a href="#java_library.deps">java_library.deps</a>.
+ See <a href="${link java_library.deps}">java_library.deps</a>.
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("deps", LABEL_LIST)
.allowedRuleClasses(ALLOWED_DEPS)
@@ -51,7 +51,7 @@ public final class BazelJavaImportRule implements RuleDefinition {
.validityPredicate(ANY_EDGE))
/* <!-- #BLAZE_RULE(java_import).ATTRIBUTE(exports) -->
Targets to make available to users of this rule.
- See <a href="#java_library.exports">java_library.exports</a>.
+ See <a href="${link java_library.exports}">java_library.exports</a>.
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("exports", LABEL_LIST)
.allowedRuleClasses(ALLOWED_DEPS)
@@ -59,7 +59,7 @@ public final class BazelJavaImportRule implements RuleDefinition {
.validityPredicate(ANY_EDGE))
/* <!-- #BLAZE_RULE(java_import).ATTRIBUTE(runtime_deps) -->
Libraries to make available to the final binary or test at runtime only.
- See <a href="#java_library.runtime_deps">java_library.runtime_deps</a>.
+ See <a href="${link java_library.runtime_deps}">java_library.runtime_deps</a>.
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("runtime_deps", LABEL_LIST)
.allowedFileTypes(JavaSemantics.JAR)
@@ -84,8 +84,8 @@ public final class BazelJavaImportRule implements RuleDefinition {
<p>
This rule allows the use of precompiled <code>.jar</code> files as
- libraries for <code><a href="#java_library">java_library</a></code> and
- <code><a href="#java_binary">java_binary</a></code> rules.
+ libraries for <code><a href="${link java_library}">java_library</a></code> and
+ <code><a href="${link java_binary}">java_binary</a></code> rules.
</p>
<h4 id="java_import_examples">Examples</h4>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaLibraryRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaLibraryRule.java
index 317c9b8ce0..240cc99982 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaLibraryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaLibraryRule.java
@@ -54,7 +54,7 @@ public final class BazelJavaLibraryRule implements RuleDefinition {
/* <!-- #BLAZE_RULE(java_library).ATTRIBUTE(data) -->
The list of files needed by this library at runtime.
See general comments about <code>data</code> at
- <a href="common-definitions.html#common-attributes">Attributes common to all build rules
+ <a href="${link common-definitions#common-attributes}">Attributes common to all build rules
</a>.
<p>
When building a <code>java_library</code>, Bazel doesn't put these files anywhere; if the
@@ -67,7 +67,7 @@ public final class BazelJavaLibraryRule implements RuleDefinition {
/* <!-- #BLAZE_RULE(java_library).ATTRIBUTE(deps) -->
The list of libraries to link into this library.
See general comments about <code>deps</code> at
- <a href="common-definitions.html#common-attributes">Attributes common to all build rules
+ <a href="${link common-definitions#common-attributes}">Attributes common to all build rules
</a>.
<p>
The jars built by <code>java_library</code> rules listed in <code>deps</code> will be on
@@ -137,12 +137,12 @@ public final class BazelJavaLibraryRule implements RuleDefinition {
.add(attr("neverlink", BOOLEAN).value(false))
.override(attr("javacopts", STRING_LIST))
/* <!-- #BLAZE_RULE(java_library).ATTRIBUTE(exported_plugins) -->
- The list of <code><a href="#java_plugin">java_plugin</a></code>s (e.g. annotation
+ The list of <code><a href="#${link java_plugin}">java_plugin</a></code>s (e.g. annotation
processors) to export to libraries that directly depend on this library.
<p>
The specified list of <code>java_plugin</code>s will be applied to any library which
directly depends on this library, just as if that library had explicitly declared these
- labels in <code><a href="#java_library.plugins">plugins</a></code>.
+ labels in <code><a href="${link java_library.plugins}">plugins</a></code>.
</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("exported_plugins", LABEL_LIST).cfg(HOST).allowedRuleClasses("java_plugin")
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaPluginRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaPluginRule.java
index 766e936b96..fdbaa9a3e4 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaPluginRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaPluginRule.java
@@ -72,14 +72,14 @@ public final class BazelJavaPluginRule implements RuleDefinition {
<code>java_binary</code> rule can run plugins by depending on them via the <code>plugins</code>
attribute. A <code>java_library</code> can also automatically export plugins to libraries that
directly depend on it using
- <code><a href="#java_library.exported_plugins">exported_plugins</a></code>.
+ <code><a href="${link java_library.exported_plugins}">exported_plugins</a></code>.
</p>
${IMPLICIT_OUTPUTS}
<p>
- Arguments are identical to <a href="#java_library"><code>java_library</code></a>, except for the
- addition of the <code>processor_class</code> argument.
+ Arguments are identical to <a href="${link java_library}"><code>java_library</code></a>, except
+ for the addition of the <code>processor_class</code> argument.
</p>
<!-- #END_BLAZE_RULE -->*/
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaTestRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaTestRule.java
index 07035d7380..0de34ae90c 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaTestRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaTestRule.java
@@ -119,8 +119,8 @@ test code. The test runner's main method is invoked instead of the main class be
${IMPLICIT_OUTPUTS}
<p>
-See the section on <a href="#java_binary_args">java_binary()</a> arguments. This rule also
-supports all <a href="common-definitions.html#common-attributes-tests">attributes common
+See the section on <a href="${link java_binary_args}">java_binary()</a> arguments. This rule also
+supports all <a href="${link common-definitions#common-attributes-tests}">attributes common
to all test rules (*_test)</a>.
</p>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyLibraryRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyLibraryRule.java
index 52e6211286..c2a80a46fe 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyLibraryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyLibraryRule.java
@@ -34,7 +34,7 @@ public final class BazelPyLibraryRule implements RuleDefinition {
/* <!-- #BLAZE_RULE(py_library).ATTRIBUTE(deps) -->
The list of other libraries to be linked in to the library target.
See general comments about <code>deps</code> at
- <a href="common-definitions.html#common-attributes">
+ <a href="${link common-definitions#common-attributes}">
Attributes common to all build rules</a>.
In practice, these arguments are treated like those in <code>srcs</code>;
you may move items between these lists willy-nilly. It's probably more
@@ -44,7 +44,7 @@ public final class BazelPyLibraryRule implements RuleDefinition {
/* <!-- #BLAZE_RULE(py_library).ATTRIBUTE(data) -->
The list of files needed by this library at runtime.
See general comments about <code>data</code> at
- <a href="common-definitions.html#common-attributes">
+ <a href="${link common-definitions#common-attributes}">
Attributes common to all build rules</a>.
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyRuleClasses.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyRuleClasses.java
index 35b23497d0..efc13ec9d2 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyRuleClasses.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyRuleClasses.java
@@ -51,12 +51,12 @@ public final class BazelPyRuleClasses {
/* <!-- #BLAZE_RULE($base_py).ATTRIBUTE(deps) -->
The list of other libraries to be linked in to the binary target.
See general comments about <code>deps</code> at
- <a href="common-definitions.html#common-attributes">
+ <a href="${link common-definitions#common-attributes}">
Attributes common to all build rules</a>.
These can be
- <a href="#py_binary"><code>py_binary</code></a> rules,
- <a href="#py_library"><code>py_library</code></a> rules or
- <a href="c-cpp.html#cc_library"><code>cc_library</code></a> rules,
+ <a href="${link py_binary}"><code>py_binary</code></a> rules,
+ <a href="${link py_library}"><code>py_library</code></a> rules or
+ <a href="${link cc_library}"><code>cc_library</code></a> rules,
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.override(builder.copy("deps")
.mandatoryProviders(ImmutableList.of(PyCommon.PYTHON_SKYLARK_PROVIDER_NAME))
@@ -64,10 +64,10 @@ public final class BazelPyRuleClasses {
/* <!-- #BLAZE_RULE($base_py).ATTRIBUTE(imports) -->
List of import directories to be added to the <code>PYTHONPATH</code>.
<p>
- Subject to <a href="make-variables.html">"Make variable"</a> substitution. These import
+ Subject to <a href="${link make-variables}">"Make variable"</a> substitution. These import
directories will be added for this rule and all rules that depend on it (note: not the
rules this rule depends on. Each directory will be added to <code>PYTHONPATH</code> by
- <a href="#py_binary"><code>py_binary</code></a> rules that depend on this rule.
+ <a href="${link py_binary}"><code>py_binary</code></a> rules that depend on this rule.
</p>
<p>
Absolute paths (paths that start with <code>/</code>) and paths that references a path
@@ -120,10 +120,10 @@ public final class BazelPyRuleClasses {
/* <!-- #BLAZE_RULE($base_py_binary).ATTRIBUTE(data) -->
The list of files needed by this binary at runtime.
See general comments about <code>data</code> at
- <a href="common-definitions.html#common-attributes">
+ <a href="${link common-definitions#common-attributes}">
Attributes common to all build rules</a>.
- Also see the <a href="#py_library.data"><code>data</code></a> argument of
- the <a href="#py_library"><code>py_library</code></a> rule for details.
+ Also see the <a href="${link py_library.data}"><code>data</code></a> argument of
+ the <a href="${link py_library}"><code>py_library</code></a> rule for details.
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
/* <!-- #BLAZE_RULE($base_py_binary).ATTRIBUTE(main) -->
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyTestRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyTestRule.java
index 2c800d0f86..b3b6ce2d93 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyTestRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyTestRule.java
@@ -38,7 +38,7 @@ public final class BazelPyTestRule implements RuleDefinition {
.override(attr("testonly", BOOLEAN).value(true)
.nonconfigurable("policy decision: should be consistent across configurations"))
/* <!-- #BLAZE_RULE(py_test).ATTRIBUTE(stamp) -->
- See the section on <a href="#py_binary_args">py_binary()</a> arguments, except
+ See the section on <a href="${link py_binary_args}">py_binary()</a> arguments, except
that the stamp argument is set to 0 by default for tests.
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.override(attr("stamp", TRISTATE).value(TriState.NO))
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShLibraryRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShLibraryRule.java
index a303691d71..bfde7bb583 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShLibraryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShLibraryRule.java
@@ -64,7 +64,7 @@ public final class BazelShLibraryRule implements RuleDefinition {
</p>
<p>
- You can use the <a href="general.html#filegroup"><code>filegroup</code></a> rule to aggregate data
+ You can use the <a href="${link filegroup}"><code>filegroup</code></a> rule to aggregate data
files.
</p>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java
index 9ec2814d94..d0740e54aa 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java
@@ -67,7 +67,8 @@ public final class BazelShRuleClasses {
/* <!-- #BLAZE_RULE($sh_target).ATTRIBUTE(deps) -->
The list of "library" targets to be aggregated into this target.
See general comments about <code>deps</code>
- at <a href="common-definitions.html#common.deps">Attributes common to all build rules</a>.
+ at <a href="${link common-definitions#common.deps}">Attributes common to all build rules
+ </a>.
<p>
This attribute should be used to list other <code>sh_library</code> rules that provide
interpreted program source code depended on by the code in <code>srcs</code>. The files
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShTestRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShTestRule.java
index 51db3b4dda..aed6ef5d10 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShTestRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShTestRule.java
@@ -45,7 +45,7 @@ public final class BazelShTestRule implements RuleDefinition {
<p>A <code>sh_test()</code> rule creates a test written as a Bourne shell script.</p>
-<p>See the <a href="common-definitions.html#common-attributes-tests">
+<p>See the <a href="${link common-definitions#common-attributes-tests}">
attributes common to all test rules (*_test)</a>.</p>
<h4 id="sh_test_examples">Examples</h4>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/HttpArchiveRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/HttpArchiveRule.java
index 884217f017..465e725ad2 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/HttpArchiveRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/HttpArchiveRule.java
@@ -100,7 +100,7 @@ public class HttpArchiveRule implements RuleDefinition {
<p>Downloads a Bazel repository as a compressed archive file,
decompresses it, and makes its targets available for binding. The
repository should already contain a BUILD file. If it does not, use
- <a href="#new_http_archive">new_http_archive</a> instead.</p>
+ <a href="${link new_http_archive}">new_http_archive</a> instead.</p>
<p>It supports Zip-formatted archives (with the .zip extension) and
tarballs (.tar.gz and .tgz extensions).</p>
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/MavenJarRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/MavenJarRule.java
index d25e22c4f1..0509bcfc03 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/MavenJarRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/MavenJarRule.java
@@ -40,7 +40,7 @@ public class MavenJarRule implements RuleDefinition {
<a href="https://maven.apache.org/pom.html#Maven_Coordinates">Maven coordinates</a>.
<p>These descriptions are of the form &lt;groupId&gt:&lt;artifactId&gt;:&lt;version&gt;,
- see <a href="#maven_jar_examples">the documentation below</a> for an example.
+ see <a href="${link maven_jar_examples}">the documentation below</a> for an example.
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("artifact", Type.STRING))
/* <!-- #BLAZE_RULE(maven_jar).ATTRIBUTE(repository) -->
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java
index b6de01ba35..bba3222850 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java
@@ -54,7 +54,7 @@ public final class AndroidBinaryOnlyRule implements RuleDefinition {
// higher number.
// This overrides the value declared in the manifest.
//
-// Subject to <a href="make-variables.html">"Make" variable</a> substitution.
+// Subject to <a href="${link make-variables}">"Make" variable</a> substitution.
// Suggested practice is to declare a varrdef and reference it here so that a particular build
// invocation will be used to generate apks for release.
// <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
@@ -64,7 +64,7 @@ public final class AndroidBinaryOnlyRule implements RuleDefinition {
// users. The version_code attribute holds the significant version number used internally.
// This overrides the value declared in the manifest.
//
-// Subject to <a href="make-variables.html">"Make" variable</a> substitution.
+// Subject to <a href="${link make-variables}">"Make" variable</a> substitution.
// Suggested practice is to declare a varrdef and reference it here so that a particular build
// invocation will be used to generate apks for release.
// <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
@@ -120,7 +120,7 @@ public final class AndroidBinaryOnlyRule implements RuleDefinition {
<li><code>manual_main_dex</code>: Split code into multiple dex files when the
dex 64K index limit is exceeded. The content of the main dex file
needs to be specified by providing a list of classes in a text file
- using the <a href="#android_binary.main_dex_list">main_dex_list</a>.</li>
+ using the <a href="${link android_binary.main_dex_list}">main_dex_list</a>.</li>
<li><code>off</code>: Compile all code to a single dex file, even if
if exceeds the index limit.</li>
</ul>
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java
index 13686f8dac..778ff8d579 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java
@@ -64,7 +64,7 @@ public final class AndroidLibraryBaseRule implements RuleDefinition {
</p>
<p>If <code>srcs</code> is omitted, then any dependency specified in
<code>deps</code> is exported from this rule (see
- <a href="java.html#java_library.exports">java_library's exports</a> for more
+ <a href="${link java_library.exports}">java_library's exports</a> for more
information about exporting dependencies). However, this behavior will be
deprecated soon; try not to rely on it.
</p>
@@ -113,7 +113,8 @@ public final class AndroidLibraryBaseRule implements RuleDefinition {
they represent under <code>idl_import_root</code>. When <code>idl_import_root</code> is
not specified, both <code>idl_parcelables</code> and <code>idl_srcs</code> must be at the
path specified by their package under a Java root.</p>
- <p>See <a href="#android_library_examples.idl_import_root">examples</a>.</p>
+ <p>See <a href="${link android_library#android_library_examples.idl_import_root}">
+ examples</a>.</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("idl_import_root", STRING))
/* <!-- #BLAZE_RULE(android_library).ATTRIBUTE(idl_srcs) -->
@@ -124,7 +125,7 @@ public final class AndroidLibraryBaseRule implements RuleDefinition {
<code>android_library</code> target that depends on this library, directly
or via its transitive closure.</p>
<p>These files must be placed appropriately for the aidl compiler to find them.
- See <a href="#android_library.idl_import_root">the description of idl_import_root</a>
+ See <a href="${link android_library.idl_import_root}">the description of idl_import_root</a>
for information about what this means.</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("idl_srcs", LABEL_LIST).direct_compile_time_input()
@@ -140,7 +141,7 @@ public final class AndroidLibraryBaseRule implements RuleDefinition {
implementations of Parcelable), otherwise <code>idl_srcs</code> should be
used.</p>
<p>These files must be placed appropriately for the aidl compiler to find them.
- See <a href="#android_library.idl_import_root">the description of idl_import_root</a>
+ See <a href="${link android_library.idl_import_root}">the description of idl_import_root</a>
for information about what this means.</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("idl_parcelables", LABEL_LIST).direct_compile_time_input()
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidRuleClasses.java
index acf7067aa3..efd3d1a9e1 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidRuleClasses.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidRuleClasses.java
@@ -509,8 +509,8 @@ public final class AndroidRuleClasses {
.value(JavaSemantics.JAVA_PLUGINS))
/* <!-- #BLAZE_RULE($android_base).ATTRIBUTE(javacopts) -->
Extra compiler options for this target.
- Subject to <a href="make-variables.html">"Make variable"</a> substitution and
- <a href="common-definitions.html#sh-tokenization">Bourne shell tokenization</a>.
+ Subject to <a href="${link make-variables}">"Make variable"</a> substitution and
+ <a href="${link common-definitions#sh-tokenization}">Bourne shell tokenization</a>.
<p>
These compiler options are passed to javac after the global compiler options.</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
@@ -611,8 +611,8 @@ public final class AndroidRuleClasses {
.value(env.getToolsLabel(DEFAULT_INCREMENTAL_SPLIT_STUB_APPLICATION)))
/* <!-- #BLAZE_RULE($android_binary_base).ATTRIBUTE(dexopts) -->
Additional command-line flags for the dx tool when generating classes.dex.
- Subject to <a href="make-variables.html">"Make variable"</a> substitution and
- <a href="common-definitions.html#sh-tokenization">Bourne shell tokenization</a>.
+ Subject to <a href="${link make-variables}">"Make variable"</a> substitution and
+ <a href="${link common-definitions#sh-tokenization}">Bourne shell tokenization</a>.
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("dexopts", STRING_LIST))
/* <!-- #BLAZE_RULE($android_binary_base).ATTRIBUTE(dex_shards) -->
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java
index 9a432ab293..bad5520b62 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java
@@ -258,8 +258,8 @@ public class ObjcRuleClasses {
return builder
/* <!-- #BLAZE_RULE($objc_opts_rule).ATTRIBUTE(copts) -->
Extra flags to pass to the compiler.
- Subject to <a href="make-variables.html">"Make variable"</a> substitution and
- <a href="common-definitions.html#sh-tokenization">Bourne shell tokenization</a>.
+ Subject to <a href="${link make-variables}">"Make variable"</a> substitution and
+ <a href="${link common-definitions#sh-tokenization}">Bourne shell tokenization</a>.
These flags will only apply to this target, and not those upon which
it depends, or those which depend on it.
<p>
@@ -620,10 +620,10 @@ public class ObjcRuleClasses {
and <code>blaze-out/pkg/includedir</code>) are included in addition to the
actual client root.
<p>
- Unlike <a href="#objc_library.copts">COPTS</a>, these flags are added for this rule
+ Unlike <a href="${link objc_library.copts}">COPTS</a>, these flags are added for this rule
and every rule that depends on it. (Note: not the rules it depends upon!) Be
very careful, since this may have far-reaching effects. When in doubt, add
- "-I" flags to <a href="#objc_library.copts">COPTS</a> instead.
+ "-I" flags to <a href="${link objc_library.copts}">COPTS</a> instead.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr("includes", Type.STRING_LIST))
/* <!-- #BLAZE_RULE($objc_compile_dependency_rule).ATTRIBUTE(sdk_includes) -->
@@ -724,8 +724,8 @@ public class ObjcRuleClasses {
the form <code>KEY=VALUE</code> or simply <code>KEY</code> and are
passed not only to the compiler for this target (as <code>copts</code>
are) but also to all <code>objc_</code> dependers of this target.
- Subject to <a href="make-variables.html">"Make variable"</a> substitution and
- <a href="common-definitions.html#sh-tokenization">Bourne shell tokenization</a>.
+ Subject to <a href="${link make-variables}">"Make variable"</a> substitution and
+ <a href="${link common-definitions#sh-tokenization}">Bourne shell tokenization</a>.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr("defines", STRING_LIST))
/* <!-- #BLAZE_RULE($objc_compiling_rule).ATTRIBUTE(enable_modules) -->
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/LocalRepositoryRule.java b/src/main/java/com/google/devtools/build/lib/rules/repository/LocalRepositoryRule.java
index 5e1c595553..375d59bf3c 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/repository/LocalRepositoryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/LocalRepositoryRule.java
@@ -57,8 +57,8 @@ public class LocalRepositoryRule implements RuleDefinition {
/*<!-- #BLAZE_RULE (NAME = local_repository, TYPE = OTHER, FAMILY = Workspace)[GENERIC_RULE] -->
<p>Allows targets from a local directory to be bound. This means that the current repository can
- use targets defined in this other directory. See the <a href="#bind_examples">bind section</a>
- for more details.</p>
+ use targets defined in this other directory. See the <a href="${link bind_examples}">bind
+ section</a> for more details.</p>
<h4 id="local_repository_examples">Examples</h4>