mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -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.
(cherry picked from commit 0ecc8b9d60
,
omitting generated files)
This commit is contained in:
parent
857c27e8b6
commit
34a18bd597
13
doc/Makefile
13
doc/Makefile
@ -14,7 +14,10 @@ PDF_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/pdf
|
||||
TXT_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/txt
|
||||
|
||||
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
|
||||
@ -167,12 +170,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
|
||||
@ -187,11 +184,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)
|
||||
|
@ -19,7 +19,7 @@ ifdef::backend-docbook[]
|
||||
|
||||
# To be replaced later
|
||||
[attributes]
|
||||
squote=@squote@
|
||||
squote='
|
||||
|
||||
# No interlinking between elinks manpages
|
||||
[man-inlinemacro]
|
||||
@ -48,6 +48,21 @@ ifdef::doctype-manpage[]
|
||||
[mailto-inlinemacro]
|
||||
<{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::backend-docbook[]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user