
PDFLATEX = env TEXINPUTS=.:LaTeX:$(TEXINPUTS): pdflatex
PSLATEX  = env TEXINPUTS=.:LaTeX:$(TEXINPUTS): latex

help:
	@echo "USAGE: make (target)"
	@echo "  targets: pantasks all"

pantasks: pantasks.pdf 
all : pantasks

%.pdf: %.tex
	$(PSLATEX) $*.tex 
	$(PSLATEX) $*.tex 
	dvips -z -t letter -o $*.ps $*.dvi
	ps2pdf $*.ps $*.pdf
	thumbpdf --modes=dvips $*.pdf
	$(PSLATEX) $*.tex 
	dvips -z -t letter -o $*.ps $*.dvi
	ps2pdf $*.ps $*.pdf
	@rm -f $*.ps $*.dvi $*.aux $*.log $*.tbr $*.tbd $*.toc $*.tpm $*.lof body.tmp head.tmp

clean :
	$(RM) *.log *.dvi *.aux *.toc *.tbd *.tbr *.tpm *.lof *.out *~ core body.tmp head.tmp

dist : clean
	$(RM) *.pdf

empty: clean
