Skip to content

Commit

Permalink
Auto merge of #6459 - ehuss:fix-man-checks, r=alexcrichton
Browse files Browse the repository at this point in the history
Fix new man page links.

The rustc link checker found some problems:
- The raw generated HTML files were being included when they shouldn't.
  Fixed by moving them out of the mdbook directory.
- The `print.html` file concatenates all the pages together, causing duplicate
  `id`'s.  Fix by giving each page a unique set of IDs.
  • Loading branch information
bors committed Dec 18, 2018
2 parents 8ffc960 + 4338d34 commit 451f97e
Show file tree
Hide file tree
Showing 119 changed files with 521 additions and 492 deletions.
6 changes: 3 additions & 3 deletions src/doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# format. See https://asciidoctor.org/ for more information.
#
# Just run `make` and it will generate the man pages in src/etc/man and the
# HTML pages in src/doc/src/commands/generated.
# HTML pages in src/doc/man/generated.
#
# There are some Asciidoctor extensions, see the file `asciidoc-extensions.rb`
# for the documentation.

MAN_SOURCE = $(sort $(wildcard man/cargo*.adoc))
COMMANDS = $(notdir $(MAN_SOURCE))
HTML = $(patsubst %.adoc,src/commands/generated/%.html,$(COMMANDS))
HTML = $(patsubst %.adoc,man/generated/%.html,$(COMMANDS))
MAN_LOCATION = ../etc/man
MAN = $(patsubst %.adoc,$(MAN_LOCATION)/%.1,$(COMMANDS))
ASCIIDOCOPTS = -r ./asciidoc-extension.rb
Expand All @@ -21,7 +21,7 @@ all: commands-html man
commands-html: $(HTML)
man: $(MAN)

$(HTML): src/commands/generated/%.html : man/%.adoc asciidoc-extension.rb $(OTHER_DEPS)
$(HTML): man/generated/%.html : man/%.adoc asciidoc-extension.rb $(OTHER_DEPS)
asciidoctor $(ASCIIDOCOPTS) -s $< -o $@

$(MAN): $(MAN_LOCATION)/%.1 : man/%.adoc $(OTHER_DEPS)
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-bench.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-bench(1)
:idprefix: cargo_bench_
:doctype: manpage
:actionverb: Benchmark
:nouns: benchmarks
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-build.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-build(1)
:idprefix: cargo_build_
:doctype: manpage
:actionverb: Build

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-check.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-check(1)
:idprefix: cargo_check_
:doctype: manpage
:actionverb: Check

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-clean.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-clean(1)
:idprefix: cargo_clean_
:doctype: manpage
:actionverb: Clean

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-doc.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-doc(1)
:idprefix: cargo_doc_
:doctype: manpage
:actionverb: Document

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-fetch.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-fetch(1)
:idprefix: cargo_fetch_
:doctype: manpage
:actionverb: Fetch

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-fix.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-fix(1)
:idprefix: cargo_fix_
:doctype: manpage
:actionverb: Fix

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-generate-lockfile.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-generate-lockfile(1)
:idprefix: cargo_generate-lockfile_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-help.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-help(1)
:idprefix: cargo_help_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-init.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-init(1)
:idprefix: cargo_init_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-install.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-install(1)
:idprefix: cargo_install_
:doctype: manpage
:actionverb: Install

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-locate-project.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-locate-project(1)
:idprefix: cargo_locate-project_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-login.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-login(1)
:idprefix: cargo_login_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-metadata.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-metadata(1)
:idprefix: cargo_metadata_
:doctype: manpage
:source-highlighter: highlightjs

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-new.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-new(1)
:idprefix: cargo_new_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-owner.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-owner(1)
:idprefix: cargo_owner_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-package.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-package(1)
:idprefix: cargo_package_
:doctype: manpage
:actionverb: Package

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-pkgid.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-pkgid(1)
:idprefix: cargo_pkgid_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-publish.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-publish(1)
:idprefix: cargo_publish_
:doctype: manpage
:actionverb: Publish

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-run.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-run(1)
:idprefix: cargo_run_
:doctype: manpage
:actionverb: Run

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-rustc.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-rustc(1)
:idprefix: cargo_rustc_
:doctype: manpage
:actionverb: Build

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-rustdoc.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-rustdoc(1)
:idprefix: cargo_rustdoc_
:doctype: manpage
:actionverb: Document

Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-search.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-search(1)
:idprefix: cargo_search_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-test.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-test(1)
:idprefix: cargo_test_
:doctype: manpage
:actionverb: Test
:nouns: tests
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-uninstall.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-uninstall(1)
:idprefix: cargo_uninstall_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-update.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-update(1)
:idprefix: cargo_update_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-verify-project.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-verify-project(1)
:idprefix: cargo_verify-project_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-version.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-version(1)
:idprefix: cargo_version_
:doctype: manpage

== NAME
Expand Down
1 change: 1 addition & 0 deletions src/doc/man/cargo-yank.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= cargo-yank(1)
:idprefix: cargo_yank_
:doctype: manpage

== NAME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<h2 id="_name">NAME</h2>
<h2 id="cargo_bench_name">NAME</h2>
<div class="sectionbody">
<p>cargo-bench - Execute benchmarks of a package</p>
</div>
<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<h2 id="cargo_bench_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="paragraph">
<p><code>cargo bench [<em>OPTIONS</em>] [BENCHNAME] [-- <em>BENCH-OPTIONS</em>]</code></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<h2 id="cargo_bench_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Compile and execute benchmarks.</p>
Expand Down Expand Up @@ -42,10 +42,10 @@ <h2 id="_description">DESCRIPTION</h2>
</div>
</div>
<div class="sect1">
<h2 id="_options">OPTIONS</h2>
<h2 id="cargo_bench_options">OPTIONS</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_benchmark_options">Benchmark Options</h3>
<h3 id="cargo_bench_benchmark_options">Benchmark Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>--no-run</strong></dt>
Expand All @@ -63,7 +63,7 @@ <h3 id="_benchmark_options">Benchmark Options</h3>
</div>
</div>
<div class="sect2">
<h3 id="_package_selection">Package Selection</h3>
<h3 id="cargo_bench_package_selection">Package Selection</h3>
<div class="paragraph">
<p>By default, when no package selection options are given, the packages selected
depend on the current working directory. In the root of a virtual workspace,
Expand Down Expand Up @@ -93,7 +93,7 @@ <h3 id="_package_selection">Package Selection</h3>
</div>
</div>
<div class="sect2">
<h3 id="_target_selection">Target Selection</h3>
<h3 id="cargo_bench_target_selection">Target Selection</h3>
<div class="paragraph">
<p>When no target selection options are given, <code>cargo bench</code> will build the
following targets of the selected packages:</p>
Expand Down Expand Up @@ -184,7 +184,7 @@ <h3 id="_target_selection">Target Selection</h3>
</div>
</div>
<div class="sect2">
<h3 id="_feature_selection">Feature Selection</h3>
<h3 id="cargo_bench_feature_selection">Feature Selection</h3>
<div class="paragraph">
<p>When no feature options are given, the <code>default</code> feature is activated for
every selected package.</p>
Expand All @@ -210,7 +210,7 @@ <h3 id="_feature_selection">Feature Selection</h3>
</div>
</div>
<div class="sect2">
<h3 id="_compilation_options">Compilation Options</h3>
<h3 id="cargo_bench_compilation_options">Compilation Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
Expand Down Expand Up @@ -258,7 +258,7 @@ <h3 id="_compilation_options">Compilation Options</h3>
</div>
</div>
<div class="sect2">
<h3 id="_output_options">Output Options</h3>
<h3 id="cargo_bench_output_options">Output Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
Expand All @@ -272,7 +272,7 @@ <h3 id="_output_options">Output Options</h3>
</div>
</div>
<div class="sect2">
<h3 id="_display_options">Display Options</h3>
<h3 id="cargo_bench_display_options">Display Options</h3>
<div class="paragraph">
<p>By default the Rust test harness hides output from benchmark execution to keep
results readable. Benchmark output can be recovered (e.g. for debugging) by
Expand Down Expand Up @@ -341,7 +341,7 @@ <h3 id="_display_options">Display Options</h3>
</div>
</div>
<div class="sect2">
<h3 id="_manifest_options">Manifest Options</h3>
<h3 id="cargo_bench_manifest_options">Manifest Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
Expand All @@ -366,7 +366,7 @@ <h3 id="_manifest_options">Manifest Options</h3>
</div>
</div>
<div class="sect2">
<h3 id="_common_options">Common Options</h3>
<h3 id="cargo_bench_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>-h</strong></dt>
Expand All @@ -383,7 +383,7 @@ <h3 id="_common_options">Common Options</h3>
</div>
</div>
<div class="sect2">
<h3 id="_miscellaneous_options">Miscellaneous Options</h3>
<h3 id="cargo_bench_miscellaneous_options">Miscellaneous Options</h3>
<div class="paragraph">
<p>The <code>--jobs</code> argument affects the building of the benchmark executable but
does not affect how many threads are used when running the benchmarks. The
Expand All @@ -404,7 +404,7 @@ <h3 id="_miscellaneous_options">Miscellaneous Options</h3>
</div>
</div>
<div class="sect1">
<h2 id="_profiles">PROFILES</h2>
<h2 id="cargo_bench_profiles">PROFILES</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Profiles may be used to configure compiler options such as optimization levels
Expand All @@ -427,7 +427,7 @@ <h2 id="_profiles">PROFILES</h2>
</div>
</div>
<div class="sect1">
<h2 id="_environment">ENVIRONMENT</h2>
<h2 id="cargo_bench_environment">ENVIRONMENT</h2>
<div class="sectionbody">
<div class="paragraph">
<p>See <a href="reference/environment-variables.html">the reference</a> for
Expand All @@ -436,7 +436,7 @@ <h2 id="_environment">ENVIRONMENT</h2>
</div>
</div>
<div class="sect1">
<h2 id="_exit_status">Exit Status</h2>
<h2 id="cargo_bench_exit_status">Exit Status</h2>
<div class="sectionbody">
<div class="dlist">
<dl>
Expand All @@ -453,7 +453,7 @@ <h2 id="_exit_status">Exit Status</h2>
</div>
</div>
<div class="sect1">
<h2 id="_examples">EXAMPLES</h2>
<h2 id="cargo_bench_examples">EXAMPLES</h2>
<div class="sectionbody">
<div class="olist arabic">
<ol class="arabic">
Expand All @@ -478,7 +478,7 @@ <h2 id="_examples">EXAMPLES</h2>
</div>
</div>
<div class="sect1">
<h2 id="_see_also">SEE ALSO</h2>
<h2 id="cargo_bench_see_also">SEE ALSO</h2>
<div class="sectionbody">
<div class="paragraph">
<p><a href="commands/index.html">cargo(1)</a>, <a href="commands/cargo-test.html">cargo-test(1)</a></p>
Expand Down
Loading

0 comments on commit 451f97e

Please sign in to comment.