diff --git a/doc/Makefile b/doc/Makefile index 15ab5b2df..e516bbbdc 100644 --- a/doc/Makefile +++ b/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,$( $@.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) diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf index 3e892aaaa..358700d32 100644 --- a/doc/asciidoc.conf +++ b/doc/asciidoc.conf @@ -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] + + +{mantitle} +{manvolnum} +ELinks +{elinks_version} +{description} + + + {manname} + {manpurpose} + + endif::doctype-manpage[] endif::backend-docbook[]