pdf: pingers.pdf echolot.pdf leuchtfeuer.pdf

pingers.bib: klaus.bib weasel.bib
	bibtool $^ > $@

pingers.pdf: pingers.tex pingers.bib
	pdflatex $<
	bibtex pingers
	pdflatex $<
	pdflatex $<

echolot.pdf: echolot.tex echolot.bib
	pdflatex $<
	bibtex echolot
	pdflatex $<
	pdflatex $<
leuchtfeuer.pdf: leuchtfeuer.tex leuchtfeuer.bib
	pdflatex $<
	bibtex leuchtfeuer
	pdflatex $<
	pdflatex $<

#%.dvi: %.tex pingers.bib
#	latex $<
#	bibtex pingers
#	latex $<
#	latex $<
#
#%.ps: %.dvi
#	dvips -o $@ $<
#
#%.pdf: %.ps
#	ps2pdf $<

clean:
	rm -f *.aux *.dvi *.log *.blg *.bbl pingers.bib pingers.pdf echolot.pdf leuchtfeuer.pdf

view-echolot: echolot.pdf
	xpdf $<
view-leuchtfeuer: leuchtfeuer.pdf
	xpdf $<
view-pingers: pingers.pdf
	xpdf $<

check-pingers: pingers.tex
	aspell --lang=en_US --personal=./wordlist -c pingers.tex
check-leuchtfeuer: leuchtfeuer.tex
	aspell --lang=en_US --personal=./wordlist -c leuchtfeuer.tex
check-echolot: echolot.tex
	aspell --lang=en_US --personal=./wordlist -c echolot.tex
check: check-pingers check-echolot check-leuchtfeuer
