From 0ecc8b9d60aea6f13d201492be103ea801271486 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 3 Mar 2008 02:51:25 +0100 Subject: [PATCH] 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. --- doc/Makefile | 13 ++++--------- doc/asciidoc.conf | 17 ++++++++++++++++- doc/man/man1/elinks.1.in | 8 ++++---- doc/man/man5/elinks.conf.5 | 6 +++--- doc/man/man5/elinkskeys.5 | 8 ++++---- 5 files changed, 31 insertions(+), 21 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 5d8e447f5..b6a05a873 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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,$( $@.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) diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf index b98a10f55..a1958c1c2 100644 --- a/doc/asciidoc.conf +++ b/doc/asciidoc.conf @@ -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] <{target}> +[header] +template::[header-declarations] + + +{mantitle} +{manvolnum} +ELinks +{elinks_version} +{description} + + + {manname} + {manpurpose} + + endif::doctype-manpage[] endif::backend-docbook[] diff --git a/doc/man/man1/elinks.1.in b/doc/man/man1/elinks.1.in index 20678dd7e..1dfc8e350 100644 --- a/doc/man/man1/elinks.1.in +++ b/doc/man/man1/elinks.1.in @@ -1,11 +1,11 @@ .\" Title: elinks .\" Author: .\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" 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) diff --git a/doc/man/man5/elinks.conf.5 b/doc/man/man5/elinks.conf.5 index 3c4ada8e9..7b5ade700 100644 --- a/doc/man/man5/elinks.conf.5 +++ b/doc/man/man5/elinks.conf.5 @@ -2,10 +2,10 @@ .\" Author: .\" Generator: DocBook XSL Stylesheets v1.72.0 .\" 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) diff --git a/doc/man/man5/elinkskeys.5 b/doc/man/man5/elinkskeys.5 index 7317d328c..a3aebe98d 100644 --- a/doc/man/man5/elinkskeys.5 +++ b/doc/man/man5/elinkskeys.5 @@ -2,10 +2,10 @@ .\" Author: .\" Generator: DocBook XSL Stylesheets v1.72.0 .\" 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