MKDOC=mkdoc --xsltroot=/usr/share/sgml/logilab-xml/stylesheet
MKXMLOPTS=--doctype book --target docbook
MKHTMLOPTS=--param toc.section.depth=2 --stylesheet single-file  --target html
MKPDFOPTS=--param toc.section.depth=2 --stylesheet standard --target pdf

XMLFILES:= $(wildcard *.xml)
HTMLTARGET := $(XMLFILES:.xml=.html)
PDFTARGET := $(XMLFILES:.xml=.pdf)



all: ${HTMLTARGET} ${PDFTARGET}
html: ${HTMLTARGET}
pdf: ${PDFTARGET}


%.html: %.xml
	${MKDOC} ${MKHTMLOPTS} $<

%.pdf: %.xml
	${MKDOC} ${MKPDFOPTS} $<


clean:
	rm -f *.html *.pdf
