# Makefile for making LaTeX sources resulting in .ps .pdf and HTML
# using LaTeX2HTML

L2H = latex2html
#L2H = /usr/bin/latex2html
#L2H = l2h
L2HOPTIONS = -no_navigation -split 0
#L2HOPTIONS = -no_navigation -split 0 -debug -verbosity 4
#PAGECOLOR = bgcsyellow
DVIPSOPTIONS =  -Pcmz -Pamz
#DVIPSOPTIONS =  -Ppdf -G0

%.dvi:	%.tex
	echo $<
	latex $<
	bibtex $<
	latex $<
	latex $<

%.ps:	%.dvi
	dvips $(DVIPSOPTIONS) $< -o $@

%.pdf:	%.ps
	ps2pdf $< $@

%:	%.dvi
	dvips $(DVIPSOPTIONS) -o $@.ps $@.dvi
	ps2pdf $@.ps
	rm -r -f $@
	$(L2H) $(L2HOPTIONS) $@
#	$(PAGECOLOR) $@/*html
	rm $@.aux $@.log $@.dvi
