# Makefile for pdf/ps documentation # $Id$ TARGET = main IMG_EPS = $(shell ls figures/*.eps) IMG_PDF = $(IMG_EPS:.eps=.pdf) FILES = $(shell ls *.tex *.bib sections/*.tex) all: $(TARGET).pdf $(TARGET).ps $(TARGET).ps: $(TARGET).dvi @dvips -o $@ $< $(TARGET).dvi: $(TARGET).tex final.tex $(FILES) $(IMG_EPS) latex $(TARGET).tex bibtex $(TARGET) latex $(TARGET).tex latex $(TARGET).tex $(TARGET).pdf: $(TARGET).tex final.tex $(FILES) $(IMG_PDF) pdflatex $(TARGET).tex bibtex $(TARGET) pdflatex $(TARGET).tex pdflatex $(TARGET).tex draft: echo "\setboolean{final}{false}" > final.tex @echo "DRAFT version set. Call 'make' now!" final: echo "\setboolean{final}{true}" > final.tex @echo "FINAL version set. Call 'make' now!" final.tex: @echo "First call either target 'draft' or 'final'!" @exit 1 figures/%.pdf: figures/%.eps epstopdf $< > /dev/null allfigures: $(IMG_PDF) clean: -rm *.aux sections/*.aux *.bbl *.blg *.lof *.lot *.log *.toc *.out $(IMG_PDF) realclean: clean -rm $(TARGET).ps $(TARGET).pdf $(TARGET).dvi