aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar David Chen <dzc@google.com>2016-01-12 15:27:11 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-01-13 13:02:13 +0000
commitbf642fa0d9f3c5ece48350a471bdd4dc3d2d4f61 (patch)
tree6742c0ce77280d32fd9ae73b35aecce8c818660c /src
parent270da872d9f40152252604b6b05bd1559a32e68f (diff)
Fix links to docs for other rules, Bazel User Manual, Build Reference, and Make
Variables docs for remaining Bazel rule classes. -- MOS_MIGRATED_REVID=111947479
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelActionListenerRule.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelExtraActionRule.java10
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelFilegroupRule.java13
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java18
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java37
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyRuleClasses.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShLibraryRule.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java2
8 files changed, 48 insertions, 41 deletions
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 f603fd3905..20baef158a 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
@@ -89,7 +89,7 @@ ${ATTRIBUTE_SIGNATURE}
</p>
<p>
- By specifying the option <a href="bazel-user-manual.html#flag--experimental_action_listener">
+ 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.
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 35fb4e0b80..ca40005c61 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
@@ -42,13 +42,14 @@ public final class BazelExtraActionRule implements RuleDefinition {
A list of <code>tool</code> dependencies for this rule.
${SYNOPSIS}
<p>
- See the definition of <a href="build-ref.html#deps">dependencies</a> for more information.
+ See the definition of <a href="../build-ref.html#deps">dependencies</a> for more
+ information.
</p>
<p>
The build system ensures these prerequisites are built before running the
<code>extra_action</code> command; they are built using the
- <a href='bazel-user-manual.html#configurations'><code>host</code>configuration</a>, since
- they must run as a tool during the build itself. The path of an individual
+ <a href='../bazel-user-manual.html#configurations'><code>host</code>configuration</a>,
+ since they must run as a tool during the build itself. The path of an individual
<code>tools</code> target <code>//x:y</code> can be obtained using
<code>$(location //x:y)</code>.
</p>
@@ -77,7 +78,8 @@ public final class BazelExtraActionRule implements RuleDefinition {
The command to run.
${SYNOPSIS}
<p>
- Like <a href="#genrule.cmd">genrule cmd attribute</a> with the following differences:
+ Like <a href="general.html#genrule.cmd">genrule cmd attribute</a> with the following
+ differences:
</p>
<ol>
<li>
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 3b00949504..8685da7548 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
@@ -39,7 +39,8 @@ public final class BazelFilegroupRule implements RuleDefinition {
The list of targets that are members of the file group.
${SYNOPSIS}
<p>
- It is common to use the result of a <a href="#glob">glob</a> expression for the value
+ It is common to use the result of a <a href="functions.html#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
file.
@@ -54,9 +55,9 @@ public final class BazelFilegroupRule implements RuleDefinition {
<code>runfiles</code> of this <code>filegroup</code> rule. When the
<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.data">general documentation of <code>data</code></a>
- for more information about how to depend on and use data files.
+ 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
+ <code>data</code></a> for more information about how to depend on and use data files.
</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr("data", LABEL_LIST).cfg(DATA).allowedFileTypes(FileTypeSet.ANY_FILE))
@@ -96,8 +97,8 @@ ${ATTRIBUTE_SIGNATURE}
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="#glob">glob</a>, <code>filegroup</code> can ensure that all files are explicitly
- known to the build system.
+ <a href="functions.html#glob">glob</a>, <code>filegroup</code> can ensure that all files are
+ explicitly known to the build system.
</p>
${ATTRIBUTE_DEFINITION}
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java
index 25293cdb2b..a6dca6f457 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java
@@ -252,7 +252,7 @@ public class BazelCppRuleClasses {
/*<!-- #BLAZE_RULE($cc_base_rule).ATTRIBUTE(copts) -->
Add these options to the C++ compilation command.
${SYNOPSIS}
- Subject to <a href="#make_variables">"Make variable"</a> substitution and
+ Subject to <a href="make-variables.html">"Make variable"</a> substitution and
<a href="#sh-tokenization">Bourne shell tokenization</a>.
<p>Each string in this attribute is added in the given order to <code>COPTS</code>
before compiling the binary target.
@@ -288,7 +288,7 @@ public class BazelCppRuleClasses {
Platform-specific information string which is used in combination
with <code>abi_deps</code>.
${SYNOPSIS}
- Subject to <a href="#make_variables">"Make" variable</a> substitution.
+ Subject to <a href="make-variables.html">"Make" variable</a> substitution.
<p>
This string typically includes references to one or more "Make" variables of the form
<code>"$(VAR)"</code>. The default value is <code>"$(ABI)"</code>.
@@ -303,7 +303,7 @@ public class BazelCppRuleClasses {
/*<!-- #BLAZE_RULE($cc_decl_rule).ATTRIBUTE(abi_deps)[DEPRECATED] -->
The list of architecture-specific dependencies that are processed to create the target.
<i>(Dictionary mapping strings to lists of
- <a href="build-ref.html#labels">labels</a>; optional)</i>
+ <a href="../build-ref.html#labels">labels</a>; optional)</i>
<p><i><a href="#configurable-attributes">Configurable attributes</a> is a generalization
of the same concept that works for most rules and attributes. It deprecates
<code>abi_deps</code>, which we intend to ultimately remove. Use configurable
@@ -336,7 +336,7 @@ public class BazelCppRuleClasses {
current build. Such paths are parameterized over "Make" variables
such as <code>$(ABI)</code>, <code>$(TARGET_CPU)</code>,
<code>$(C_COMPILER)</code>, etc, but since "Make" variables are not
- allowed in <a href="build-ref.html#labels">labels</a>, the
+ allowed in <a href="../build-ref.html#labels">labels</a>, the
architecture-specific files cannot be specified via the normal
<code>srcs</code> attribute. Instead, this mechanism can be used
to declare architecture-specific dependent rules for the current
@@ -354,7 +354,7 @@ public class BazelCppRuleClasses {
/*<!-- #BLAZE_RULE($cc_decl_rule).ATTRIBUTE(defines) -->
List of defines to add to the compile line.
${SYNOPSIS}
- Subject to <a href="#make_variables">"Make" variable</a> substitution and
+ Subject to <a href="make-variables.html">"Make" variable</a> substitution and
<a href="#sh-tokenization">Bourne shell tokenization</a>.
Each string, which must consist of a single Bourne shell token,
is prepended with <code>-D</code> and added to
@@ -368,7 +368,7 @@ public class BazelCppRuleClasses {
/*<!-- #BLAZE_RULE($cc_decl_rule).ATTRIBUTE(includes) -->
List of include dirs to be added to the compile line.
${SYNOPSIS}
- Subject to <a href="#make_variables">"Make variable"</a> substitution.
+ Subject to <a href="make-variables.html">"Make variable"</a> substitution.
Each string is prepended with <code>-iquote</code> and added to <code>COPTS</code>. Unlike
<a href="#cc_binary.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
@@ -469,7 +469,7 @@ public class BazelCppRuleClasses {
/*<!-- #BLAZE_RULE($cc_rule).ATTRIBUTE(linkopts) -->
Add these flags to the C++ linker command.
${SYNOPSIS}
- Subject to <a href="#make_variables">"Make" variable</a> substitution,
+ Subject to <a href="make-variables.html">"Make" variable</a> substitution,
<a href="#sh-tokenization">Bourne shell tokenization</a>
and <a href="#label-expansion">label expansion</a>.
Each string in this attribute is added to <code>LINKOPTS</code> before
@@ -486,7 +486,7 @@ public class BazelCppRuleClasses {
/*<!-- #BLAZE_RULE($cc_rule).ATTRIBUTE(nocopts) -->
Remove matching options from the C++ compilation command.
${SYNOPSIS}
- Subject to <a href="#make_variables">"Make" variable</a> substitution.
+ Subject to <a href="make-variables.html">"Make" variable</a> substitution.
The value of this attribute is interpreted as a regular expression.
Any preexisting <code>COPTS</code> that match this regular expression
(not including values explicitly specified in the rule's <a
@@ -592,7 +592,7 @@ public class BazelCppRuleClasses {
<li><code>stamp = 0</code>: Always replace build information by constant
values. This gives good build result caching.</li>
<li><code>stamp = -1</code>: Embedding of build information is controlled
- by the <a href="blaze-user-manual.html#flag--stamp">--[no]stamp</a> flag.</li>
+ by the <a href="../blaze-user-manual.html#flag--stamp">--[no]stamp</a> flag.</li>
</ul>
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
// TODO(bazel-team): document this. Figure out a standard way to access stamp data at
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 820d5d75b5..593d32aed2 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
@@ -74,7 +74,7 @@ public final class BazelGenRuleRule implements RuleDefinition {
${SYNOPSIS}
<p>
The build system ensures these prerequisites are built before running the genrule command;
- they are built using the <a href='blaze-user-manual.html#configurations'><i>host</i>
+ they are built using the <a href='../blaze-user-manual.html#configurations'><i>host</i>
configuration</a>, since these tools are executed as part of the build. The path of an
individual <code>tools</code> target <code>//x:y</code> can be obtained using
<code>$(location //x:y)</code>.
@@ -104,7 +104,7 @@ public final class BazelGenRuleRule implements RuleDefinition {
/* <!-- #BLAZE_RULE(genrule).ATTRIBUTE(cmd) -->
The command to run.
${SYNOPSIS}
- Subject to <a href="#location">$(location)</a> and <a href="#make_variables">"Make"
+ Subject to <a href="#location">$(location)</a> and <a href="make-variables.html">"Make"
variable</a> substitution.
<ol>
<li>
@@ -121,10 +121,11 @@ public final class BazelGenRuleRule implements RuleDefinition {
</p>
</li>
<li>
- Next, <a href="#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 dependencies.
+ Next, <a href="make-variables.html">"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
+ dependencies.
</li>
<li>
Finally, the resulting command is executed using the Bash shell. If its exit code is
@@ -134,10 +135,11 @@ public final class BazelGenRuleRule implements RuleDefinition {
<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="build-ref.html#labels">label</a> and <code>$(location)</code> expansion for this.
- The <a href="#predefined_variables">Predefined "Make" Variables</a> and the
- <a href="#predefined_variables.genrule.cmd">genrule-specific "Make" variables</a> are also
- available for <code>cmd</code>.
+ <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>.
</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("cmd", STRING).mandatory())
@@ -242,7 +244,7 @@ ${ATTRIBUTE_SIGNATURE}
<h4>Cross-compilation Considerations</h4>
<p>
- <em>See <a href="bazel-user-manual.html#configurations">the user manual</a> for more info about
+ <em>See <a href="../bazel-user-manual.html#configurations">the user manual</a> for more info about
cross-compilation.</em>
</p>
<p>
@@ -262,7 +264,7 @@ ${ATTRIBUTE_SIGNATURE}
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">"Make"
+ 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.
</p>
<p>
@@ -281,12 +283,13 @@ ${ATTRIBUTE_SIGNATURE}
host configuration, because that's where the compiler will run in the other genrule. In this case,
the build system does the right thing automatically: it builds the <code>srcs</code> and
<code>outs</code> of the first genrule for the host configuration instead of the target
- configuration. See <a href="bazel-user-manual.html#configurations">the user manual</a> for more
+ configuration. See <a href="../bazel-user-manual.html#configurations">the user manual</a> for more
info.
</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">"Make" variable</a> for details.
+ provides a set of variables to use. See <a href="make-variables.html">"Make" variable</a> for
+ details.
</p>
<h4>Genrule Environment</h4>
@@ -351,9 +354,9 @@ genrule(
</pre>
<p>
- The following example shows how to use a <a href="#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
+ The following example shows how to use a <a href="general.html#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.
</p>
<pre class="code">
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 7c1e06ecc5..4142f3658d 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
@@ -59,7 +59,7 @@ public final class BazelPyRuleClasses {
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="#cc_library"><code>cc_library</code></a> rules,
+ <a href="c-cpp.html#cc_library"><code>cc_library</code></a> rules,
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.override(builder.copy("deps")
.allowedRuleClasses(ALLOWED_RULES_IN_DEPS)
@@ -161,7 +161,7 @@ public final class BazelPyRuleClasses {
<li><code>stamp = 0</code>: Always replace build information by constant
values. This gives good build result caching.</li>
<li><code>stamp = -1</code>: Embedding of build information is controlled
- by the <a href="blaze-user-manual.html#flag--stamp">--[no]stamp</a> Blaze
+ by the <a href="../blaze-user-manual.html#flag--stamp">--[no]stamp</a> Blaze
flag.</li>
</ul>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
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 2c9f9d9ea9..879f0dfa97 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
@@ -67,7 +67,8 @@ ${ATTRIBUTE_SIGNATURE}
</p>
<p>
- You can use the <a href="#filegroup"><code>filegroup</code></a> rule to aggregate data files.
+ You can use the <a href="general.html#filegroup"><code>filegroup</code></a> rule to aggregate data
+ files.
</p>
<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 8715f226ca..1422fa7fec 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
@@ -69,7 +69,7 @@ public final class BazelShRuleClasses {
The list of "library" targets to be aggregated into this target.
${SYNOPSIS}
See general comments about <code>deps</code>
- at <a href="#common.deps">Attributes common to all build rules</a>.
+ at <a href="common-definitions.html#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