Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH 2/2] Documentation: Add version information to man pages

From: Frank Lichtenheld <hidden>
Date: 2016-06-15 22:43:01
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Possibly related (same subject, not in this thread)

Override the [header] macro of asciidoc's docbook
backend to add version information to the generated
man pages.

Signed-off-by: Frank Lichtenheld <redacted>
---
 Documentation/asciidoc.conf |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

 This one is unchanged but now applied to asciidoc.conf directly
 since asciidoc.conf.in is no longer necessary.
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 44b1ce4..a86c31d 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -31,6 +31,23 @@ ifdef::backend-docbook[]
 {title#}</example>
 endif::backend-docbook[]
 
+ifdef::backend-docbook[]
+[header]
+template::[header-declarations]
+<refentry>
+<refmeta>
+<refentrytitle>{mantitle}</refentrytitle>
+<manvolnum>{manvolnum}</manvolnum>
+<refmiscinfo class="source">Git</refmiscinfo>
+<refmiscinfo class="version">@@GIT_VERSION@@</refmiscinfo>
+<refmiscinfo class="manual">Git Manual</refmiscinfo>
+</refmeta>
+<refnamediv>
+  <refname>{manname}</refname>
+  <refpurpose>{manpurpose}</refpurpose>
+</refnamediv>
+endif::backend-docbook[]
+
 ifdef::backend-xhtml11[]
 [gitlink-inlinemacro]
 <a href="{target}.html">{target}{0?({0})}</a>
-- 
1.5.0.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help