1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

Add description and version info to manpages

This adopts customized docbook manpage header from git's
Documentation/asciidoc.conf and does away with a couple of
ugly hacks.
This commit is contained in:
Jonas Fonseca 2008-03-03 02:51:25 +01:00
parent 8fd01fa28d
commit 0ecc8b9d60
5 changed files with 31 additions and 21 deletions

View File

@ -13,7 +13,10 @@ HTML_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/html
PDF_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/pdf
ASCIIDOC_CONF = $(srcdir)asciidoc.conf
ASCIIDOC_FLAGS += -f $(ASCIIDOC_CONF) -a "builddir=$(CURDIR)/" -a asciidoc7compatible
ASCIIDOC_FLAGS += -f $(ASCIIDOC_CONF) \
-a "builddir=$(CURDIR)/" \
-a asciidoc7compatible \
-a elinks_version=$(VERSION)
#############################################################################
# Build files
@ -153,12 +156,6 @@ asciidoc_dep = sed -n 's/[{]builddir}//g;s@include::\(.*\)\[.*@$@: $< \1@p' < $<
-include .deps/*.asciidoc
# Do a little post-processing of man pages. Inserting title headers and date.
MAN_DATE = $(shell date -I)
man_desc = `sed -n 's/:Description:\s*\(.*\)/\1/p' < $(srcdir)$(subst .xml,.txt,$(<F))`
man_hack = sed "s/^\(\.TH \"ELINKS[^\"]*\" [0-9] \).*/\1\"$(1)\" \"$(MAN_DATE)\" \"$(1)\"/" < $@ | \
sed "s/@squote@/\\\\'/g" > $@.tmp && mv $@.tmp $@
#############################################################################
# Build recipies
@ -173,11 +170,9 @@ man_hack = sed "s/^\(\.TH \"ELINKS[^\"]*\" [0-9] \).*/\1\"$(1)\" \"$(MAN_DATE)\"
%.1: %.1.xml
$(call cmd,xmlto,man)
@$(call man_hack,$(call man_desc))
%.5: %.5.xml
$(call cmd,xmlto,man)
@$(call man_hack,$(call man_desc))
%.html-chunked: %.xml
$(call cmd,xmlto,html)

View File

@ -28,7 +28,7 @@ ifdef::backend-docbook[]
# To be replaced later
[attributes]
squote=@squote@
squote='
# No interlinking between elinks manpages
[man-inlinemacro]
@ -57,6 +57,21 @@ ifdef::doctype-manpage[]
[mailto-inlinemacro]
&lt;{target}&gt;
[header]
template::[header-declarations]
<refentry>
<refmeta>
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>
<refmiscinfo class="source">ELinks</refmiscinfo>
<refmiscinfo class="version">{elinks_version}</refmiscinfo>
<refmiscinfo class="manual">{description}</refmiscinfo>
</refmeta>
<refnamediv>
<refname>{manname}</refname>
<refpurpose>{manpurpose}</refpurpose>
</refnamediv>
endif::doctype-manpage[]
endif::backend-docbook[]

View File

@ -1,11 +1,11 @@
.\" Title: elinks
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
.\" Date: 03/02/2008
.\" Manual:
.\" Source:
.\" Date: 03/03/2008
.\" Manual: The Elinks text-browser
.\" Source: ELinks 0.11.4rc0.GIT
.\"
.TH "ELINKS" "1" "03/02/2008" "" ""
.TH "ELINKS" "1" "03/03/2008" "ELinks 0.11.4rc0.GIT" "The Elinks text\-browser"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)

View File

@ -2,10 +2,10 @@
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
.\" Date: 03/03/2008
.\" Manual:
.\" Source:
.\" Manual: ELinks configuration file
.\" Source: ELinks 0.11.4rc0.GIT
.\"
.TH "ELINKS.CONF" "5" "03/03/2008" "" ""
.TH "ELINKS.CONF" "5" "03/03/2008" "ELinks 0.11.4rc0.GIT" "ELinks configuration file"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)

View File

@ -2,10 +2,10 @@
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
.\" Date: 03/03/2008
.\" Manual:
.\" Source:
.\" Manual: ELinks keybindings
.\" Source: ELinks 0.11.4rc0.GIT
.\"
.TH "ELINKSKEYS" "5" "03/03/2008" "" ""
.TH "ELINKSKEYS" "5" "03/03/2008" "ELinks 0.11.4rc0.GIT" "ELinks keybindings"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@ -1052,7 +1052,7 @@ Toggle wrapping of text (\fItoggle\-wrap\-text\fR)
Scroll left (\fIscroll\-left\fR)
.RE
.PP
\fI"\'"\fR
\fI"'"\fR
.RS 4
Go at a specified mark (\fImark\-goto\fR)
.RE