]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Documentation: Add version information to man pages
authorFrank Lichtenheld <frank@lichtenheld.de>
Sun, 25 Mar 2007 11:56:50 +0000 (13:56 +0200)
committerJunio C Hamano <junkio@cox.net>
Wed, 28 Mar 2007 23:48:50 +0000 (16:48 -0700)
Override the [header] macro of asciidoc's docbook
backend to add version information to the generated
man pages.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/asciidoc.conf

index 44b1ce4c6b56348e1661b60fc923cb80cb44d4ff..a86c31d00abc6cdb9f9ea24a8d4c00cdbfd18a9d 100644 (file)
@@ -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>