MANUAL = manual.sgml c1.sgml c2.sgml c3.sgml c4.sgml c5.sgml license.sgml

.SUFFIXES:
.SUFFIXES: .tex .pdf .html .sgml

.tex.pdf:
	pdfjadetex $*.tex
	pdfjadetex $*.tex
	pdfjadetex $*.tex

.sgml.tex:
	openjade -d /usr/local/share/sgml/stylesheets/docbook/print/docbook.dsl -c /etc/sgml/catalog -t tex $*.sgml

.sgml.html:
	openjade -d /usr/local/share/sgml/stylesheets/docbook/html/docbook.dsl -c /etc/sgml/catalog -i html -t sgml -V nochunks $*.sgml > $*.html

all: manual.html manual.pdf pgp2x.html pgp2x.pdf gph.tar.gz

manual.tex: $(MANUAL) signatures.jpg
	openjade -d /usr/local/share/sgml/stylesheets/docbook/print/docbook.dsl -c /etc/sgml/catalog -t tex manual.sgml

manual.html: $(MANUAL) signatures.jpg
	openjade -d /usr/local/share/sgml/stylesheets/docbook/html/docbook.dsl -c /etc/sgml/catalog -i html -t sgml -V nochunks manual.sgml > manual.html

gph.tar.gz: $(MANUAL)
	tar czf gph.tar.gz Makefile signatures.fig $(MANUAL)

clean:
	rm -rf *.dvi *.aux *.pdf *.html *.tex *.log *.eps *.gz *.jpg

signatures.jpg: signatures.fig
	fig2dev -L jpeg -m 0.7 signatures.fig signatures.jpg

