Allow man pages to link to each other

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1018023002
This commit is contained in:
Mark Mentovai 2015-03-18 17:13:22 -04:00
parent c052c97c7e
commit af9e78940e
8 changed files with 41 additions and 17 deletions

View File

@ -29,3 +29,25 @@ ifdef::basebackend-html[]
{mansource=Version} {manversion={revnumber}}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
Last updated {revdate}
endif::basebackend-html[]
# The man_link macro was inspired by gits linkgit macro. See
# https://github.com/git/git/blob/master/Documentation/asciidoc.conf.
ifdef::doctype-manpage[]
[macros]
(?su)[\\]?(?P<name>man_link):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
ifdef::backend-docbook[]
[man_link-inlinemacro]
{0%{target}}
{0#<citerefentry>}
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
{0#</citerefentry>}
endif::backend-docbook[]
ifdef::basebackend-html[]
[man_link-inlinemacro]
<a href="{target}.html">{target}{0?({0})}</a>
endif::basebackend-html[]
endif::doctype-manpage[]

View File

@ -88,6 +88,7 @@ for input in \
--attribute manversion="${version}" \
--attribute manmanual="Crashpad Manual" \
--attribute revdate="${git_date}" \
--asciidoc-opts=--conf-file=doc/asciidoc.conf \
--doctype manpage \
--format manpage \
--destination-dir "${output_dir}/man" \

View File

@ -43,8 +43,9 @@ senders, the server exits after allowing any upload in progress to complete.
It is not normally appropriate to invoke this program directly. Usually, it will
be invoked by a Crashpad client using the Crashpad client library. Arbitrary
programs may be run with a Crashpad handler by using run_with_crashpad(1) to
establish the Crashpad client environment before running a program.
programs may be run with a Crashpad handler by using
man_link:run_with_crashpad[1] to establish the Crashpad client environment
before running a program.
== Options
*--annotation*='KEY=VALUE'::
@ -99,8 +100,8 @@ Failure, with a message printed to the standard error stream.
== See Also
catch_exception_tool(1),
generate_dump(1),
run_with_crashpad(1)
man_link:catch_exception_tool[1],
man_link:generate_dump[1],
man_link:run_with_crashpad[1]
include::../../doc/man_footer.ad[]

View File

@ -91,6 +91,6 @@ Failure, with a message printed to the standard error stream.
== See Also
catch_exception_tool(1)
man_link:catch_exception_tool[1]
include::../doc/man_footer.ad[]

View File

@ -111,7 +111,7 @@ Failure, with a message printed to the standard error stream.
== See Also
exception_port_tool(1),
on_demand_service_tool(1)
man_link:exception_port_tool[1],
man_link:on_demand_service_tool[1]
include::../../doc/man_footer.ad[]

View File

@ -182,7 +182,7 @@ The program specified by 'COMMAND' could not be found.
== See Also
catch_exception_tool(1),
on_demand_service_tool(1)
man_link:catch_exception_tool[1],
man_link:on_demand_service_tool[1]
include::../../doc/man_footer.ad[]

View File

@ -68,8 +68,8 @@ Output version information and exit.
== Examples
Registers an on-demand server that will execute catch_exception_tool(1) when a
Mach message is sent to a Mach port obtained from the bootstrap server by
Registers an on-demand server that will execute man_link:catch_exception_tool[1]
when a Mach message is sent to a Mach port obtained from the bootstrap server by
looking up the name +svc+:
[subs="quotes"]
----
@ -95,8 +95,8 @@ Failure, with a message printed to the standard error stream.
== See Also
exception_port_tool(1),
man_link:catch_exception_tool[1],
man_link:exception_port_tool[1],
launchctl(1)
on_demand_service_tool(1)
include::../../doc/man_footer.ad[]

View File

@ -80,7 +80,7 @@ Illegal instruction: 4
----
Starts a Crashpad exception handler server at a nonstandard path, and runs
exception_port_tool(1) to show the task-level exception ports.
man_link:exception_port_tool[1] to show the task-level exception ports.
[subs="quotes"]
----
$ *run_with_crashpad --handler=/tmp/crashpad_handler \
@ -106,7 +106,7 @@ The program specified by 'COMMAND' could not be found.
== See Also
crashpad_handler(8),
exception_port_tool(1)
man_link:crashpad_handler[8],
man_link:exception_port_tool[1]
include::../../doc/man_footer.ad[]