view doc/Makefile @ 1814:7956893e8458

generate hg manpage from docstring is a script generating a part of the manpage (the commands help and options) from the docstring in It avoids duplicating the doc between the doc/ directory and the docstrings. To generate the manpage, 'make doc' will create all the necessary intermediate files.
author Benoit Boissinot <>
date Tue, 28 Feb 2006 00:48:49 +0100
parents c6c76ead1cc1
children d657bfdc06c4
line wrap: on
line source

SOURCES=$(wildcard *.[0-9].txt)

all: man html

man: $(MAN)

html: $(HTML)

hg.1.txt: hg.1.gendoc.txt
	touch hg.1.txt

	python > $@

%: %.xml
	xmlto man $*.xml

%.xml: %.txt
	asciidoc -d manpage -b docbook $*.txt

%.html: %.txt
	asciidoc -b html4 $*.txt || asciidoc -b html $*.txt

	$(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html)