# $Id: Makefile,v 1.5 2007/07/03 19:05:14 cvs Exp $

all: 3pdf 3html clean
pdf: 2pdf clean


2pdf: superclean
	@-docbook2pdf ubuntu-secure-server-guide-main.xml
	@-docbook2pdf ubuntu-secure-server-guide-main.xml

2html:
	@-docbook2html ubuntu-secure-server-guide-main.xml

3html:
	@-xmlto --skip-validation xhtml -m xhtml-fragment.xsl ubuntu-secure-server-guide-main.xml

3pdf:
	@-xsltproc --output guide.fo \
		fo.xsl \
		ubuntu-secure-server-guide-main.xml
	@-~leucos/local/fop-0.93/fop -fo guide.fo -c fop.xconf -pdf guide.pdf
	@-rm -f myfile.fo

clean:
	@-rm *.{log,out,aux} 2>/dev/null
	@-rm	*~ 2>/dev/null

superclean: clean cleanpdf

cleanpdf:
	@-rm *.pdf 2>/dev/null

entities: *.xml
	for i in *.xml; do \
		cp "$${i}" "$${i}".save; \
		entities2 "$${i}".save > "$${i}"; \
	done
