aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm
diff options
context:
space:
mode:
authorGravatar David Chen <dzc@google.com>2016-08-29 10:25:17 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-08-29 12:59:49 +0000
commit915dbdf187d52fda5547b5336e21339dceeb8e37 (patch)
treecdf8f59e41abdd7cebfd1dab55c70aed26bad493 /src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm
parent3bae1defc1d6198a7d73a616e2c448011250782d (diff)
Implement generating single-page Build Encyclopedia.
* Adds a --single_page flag to the BE docgen for generating a single-page version of the Build Encyclopedia. * Refactor BuildEncyclopediaProcessor common logic into a base class and add subclasses for generating single- and multi-page BE respectively. * Enable RuleLinkExpander to expand rule references to single-page hrefs (headings on the current page). * Update docgen velocity templates to use RuleLinkExpander to ensure links are correct on both single- and multi-page versions of the BE. -- MOS_MIGRATED_REVID=131574793
Diffstat (limited to 'src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm')
-rw-r--r--src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm b/src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm
index 2f5b9075e9..35448ed4a9 100644
--- a/src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm
+++ b/src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm
@@ -1,15 +1,20 @@
+#if (!$singlePage)
---
layout: documentation
title: Make Variables
---
+#end
+#if (!$singlePage)
#parse("com/google/devtools/build/docgen/templates/be/header.vm")
+#end
<!-- ============================================
variables
============================================
-->
-<h1>"Make" Variables</h1>
+<h1 id="make-variables">"Make" Variables</h1>
+#if (!$singlePage)
<div class="toc">
<ul>
<li><a href="#make-var-substitution">"Make" variable subsitution</a></li>
@@ -17,6 +22,7 @@ title: Make Variables
<li><a href="#location">"$(location)" substitution</a></li>
</ul>
</div>
+#end
<p>
This section describes how to use a special class of built-in string variables
that are called the "Make" environment.
@@ -33,7 +39,7 @@ title: Make Variables
</p>
<p>Build rules can introduce additional rule specific variables. One example is
- the <a href="general.html#genrule.cmd"><code>cmd</code> attribute of a genrule</a>.
+ the <a href="$expander.expandRef("genrule.cmd")"><code>cmd</code> attribute of a genrule</a>.
</p>
<h2 id='make-var-substitution'>"Make" variable substitution</h2>
@@ -142,7 +148,7 @@ in your genrule's cmd attribute.
<p id="predefined_variables.genrule.cmd">
<strong>
- Other Variables available to <a href="general.html#genrule.cmd">the cmd
+ Other Variables available to <a href="$expander.expandRef("genrule.cmd")">the cmd
attribute of a genrule</a>
</strong>
</p>
@@ -197,4 +203,6 @@ in your genrule's cmd attribute.
<code>*_test</code> or <code>*_binary</code> rule.
</p>
+#if (!$singlePage)
#parse("com/google/devtools/build/docgen/templates/be/footer.vm")
+#end