manual.toc manual.pdf
ifneq (,$(wildcard .git))
-VERSION = $(shell git-describe)
-WTDIRTY = $(shell git-diff-index --name-only HEAD 2>/dev/null)
-CFLAGS += '-DVERSION="$(VERSION)$(if $(WTDIRTY),-dirty)"'
+GITDESC = $(subst tig-,,$(shell git describe))
+WTDIRTY = $(if $(shell git-diff-index HEAD 2>/dev/null),-dirty)
+VERSION = $(GITDESC)$(WTDIRTY)
+CFLAGS += '-DVERSION="tig-$(VERSION)"'
endif
all: $(PROGS)
asciidoc -b xhtml11 -d manpage $<
%.1.xml : %.1.txt
- asciidoc -b docbook -d manpage $<
+ asciidoc -b docbook -d manpage -aversion=$(VERSION) $<
%.1 : %.1.xml
xmlto -m manpage.xsl man $<
asciidoc -b xhtml11 -d manpage $<
%.5.xml : %.5.txt
- asciidoc -b docbook -d manpage $<
+ asciidoc -b docbook -d manpage -aversion=$(VERSION) $<
%.5 : %.5.xml
xmlto -m manpage.xsl man $<
<a href="{target}{0?.{0}}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[header]
+template::[header-declarations]
+<refentry>
+<refmeta>
+<refentrytitle>{mantitle}</refentrytitle>
+<manvolnum>{manvolnum}</manvolnum>
+<refmiscinfo class="source">Tig</refmiscinfo>
+<refmiscinfo class="version">{version}</refmiscinfo>
+<refmiscinfo class="manual">Tig Manual</refmiscinfo>
+</refmeta>
+<refnamediv>
+ <refname>{manname}</refname>
+ <refpurpose>{manpurpose}</refpurpose>
+</refnamediv>
+endif::backend-docbook[]
+endif::doctype-manpage[]
+
ifdef::readme[]
# No header or footers for README.html
[header]