doc/Makefile
author Vadim Gelfer <vadim.gelfer@gmail.com>
Thu, 04 May 2006 11:32:00 -0700
changeset 2197 5de8b44f0446
parent 1879 9ef0850b9b68
child 2233 3840cefa5222
permissions -rw-r--r--
define standard name for base url to use when printing hgweb urls. useful for bugzilla integration, email notifications, other stuffs.

SOURCES=$(wildcard *.[0-9].txt)
MAN=$(SOURCES:%.txt=%)
HTML=$(SOURCES:%.txt=%.html)

all: man html

man: $(MAN)

html: $(HTML)

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

hg.1.gendoc.txt: ../mercurial/commands.py
	python gendoc.py > $@

%: %.xml
	xmlto man $*.xml

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

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

clean:
	$(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt