mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04: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:
parent
8fd01fa28d
commit
0ecc8b9d60
13
doc/Makefile
13
doc/Makefile
@ -13,7 +13,10 @@ HTML_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/html
|
|||||||
PDF_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/pdf
|
PDF_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/pdf
|
||||||
|
|
||||||
ASCIIDOC_CONF = $(srcdir)asciidoc.conf
|
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
|
# Build files
|
||||||
@ -153,12 +156,6 @@ asciidoc_dep = sed -n 's/[{]builddir}//g;s@include::\(.*\)\[.*@$@: $< \1@p' < $<
|
|||||||
|
|
||||||
-include .deps/*.asciidoc
|
-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
|
# Build recipies
|
||||||
@ -173,11 +170,9 @@ man_hack = sed "s/^\(\.TH \"ELINKS[^\"]*\" [0-9] \).*/\1\"$(1)\" \"$(MAN_DATE)\"
|
|||||||
|
|
||||||
%.1: %.1.xml
|
%.1: %.1.xml
|
||||||
$(call cmd,xmlto,man)
|
$(call cmd,xmlto,man)
|
||||||
@$(call man_hack,$(call man_desc))
|
|
||||||
|
|
||||||
%.5: %.5.xml
|
%.5: %.5.xml
|
||||||
$(call cmd,xmlto,man)
|
$(call cmd,xmlto,man)
|
||||||
@$(call man_hack,$(call man_desc))
|
|
||||||
|
|
||||||
%.html-chunked: %.xml
|
%.html-chunked: %.xml
|
||||||
$(call cmd,xmlto,html)
|
$(call cmd,xmlto,html)
|
||||||
|
@ -28,7 +28,7 @@ ifdef::backend-docbook[]
|
|||||||
|
|
||||||
# To be replaced later
|
# To be replaced later
|
||||||
[attributes]
|
[attributes]
|
||||||
squote=@squote@
|
squote='
|
||||||
|
|
||||||
# No interlinking between elinks manpages
|
# No interlinking between elinks manpages
|
||||||
[man-inlinemacro]
|
[man-inlinemacro]
|
||||||
@ -57,6 +57,21 @@ ifdef::doctype-manpage[]
|
|||||||
[mailto-inlinemacro]
|
[mailto-inlinemacro]
|
||||||
<{target}>
|
<{target}>
|
||||||
|
|
||||||
|
[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::doctype-manpage[]
|
||||||
endif::backend-docbook[]
|
endif::backend-docbook[]
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
.\" Title: elinks
|
.\" Title: elinks
|
||||||
.\" Author:
|
.\" Author:
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
|
||||||
.\" Date: 03/02/2008
|
.\" Date: 03/03/2008
|
||||||
.\" Manual:
|
.\" Manual: The Elinks text-browser
|
||||||
.\" Source:
|
.\" 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
|
.\" disable hyphenation
|
||||||
.nh
|
.nh
|
||||||
.\" disable justification (adjust text to left margin only)
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
.\" Author:
|
.\" Author:
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
|
||||||
.\" Date: 03/03/2008
|
.\" Date: 03/03/2008
|
||||||
.\" Manual:
|
.\" Manual: ELinks configuration file
|
||||||
.\" Source:
|
.\" 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
|
.\" disable hyphenation
|
||||||
.nh
|
.nh
|
||||||
.\" disable justification (adjust text to left margin only)
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
.\" Author:
|
.\" Author:
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
|
||||||
.\" Date: 03/03/2008
|
.\" Date: 03/03/2008
|
||||||
.\" Manual:
|
.\" Manual: ELinks keybindings
|
||||||
.\" Source:
|
.\" 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
|
.\" disable hyphenation
|
||||||
.nh
|
.nh
|
||||||
.\" disable justification (adjust text to left margin only)
|
.\" 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)
|
Scroll left (\fIscroll\-left\fR)
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fI"\'"\fR
|
\fI"'"\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Go at a specified mark (\fImark\-goto\fR)
|
Go at a specified mark (\fImark\-goto\fR)
|
||||||
.RE
|
.RE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user