doc/Makefile
author Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl>
Fri, 07 Apr 2006 22:31:54 +0200
changeset 2051 6a03cff2b0f5
parent 1879 9ef0850b9b68
child 2233 3840cefa5222
permissions -rw-r--r--
Try to use /usr/bin/test or /bin/test to work around missing features. The builtin "test" of Solaris 8 /bin/sh doesn't understand -nt.

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