SOURCE_IMG = $(wildcard images/*.dia) PS_IMG = $(SOURCE_IMG:.dia=.ps) EPS_IMG = $(SOURCE_IMG:.dia=.eps) PDF_IMG = $(SOURCE_IMG:.dia=.pdf) SOURCE = mailserv.tex OUTPS = $(SOURCE:.tex=.ps) OUTDVI = $(SOURCE:.tex=.dvi) OUTPDF = $(SOURCE:.tex=.pdf) PNG_IMG = $(wildcard images/*.png) OUTAUX = $(SOURCE:.tex=.aux) PNG_IMG= $(wildcard images/*.png) PNG_EPS_IMG = $(PNG_IMG:.png=.eps) #TEXFILES = $(wildcard *.tex) TEXFILES = mailserv.tex all: $(PDF_IMG) $(PNG_EPS_IMG) $(OUTPDF) $(OUTPDF): $(TEXFILES) pdflatex $(@:.pdf=.tex) makeindex $(@:.pdf=.idx) bibtex $(@:.pdf=.aux) pdflatex $(@:.pdf=.tex) pdflatex $(@:.pdf=.tex) $(PNG_EPS_IMG): %.eps : %.png pngtopnm $< | pnmtops -noturn > $@ $(PDF_IMG): %.pdf: %.eps epstopdf $< --outfile=$@ $(PS_IMG): %.ps : %.eps eps2eps $< $@ $(EPS_IMG): %.eps : %.dia dia --nosplash -e $@ $< $(OUTDVI): %.dvi : %.tex latex $< $(OUTPS): %.ps : %.dvi dvips $< $(OUTAUX): %.aux : %.tex latex $< makeindex $(<:.tex=.idx) bibtex $(<:.tex=) latex $< clean: rm -f *.dvi *.log *.ps *.html *.aux *.toc *.rel *.ilg *.rip *.ind \ *.pdf *.out *.idx *~ rm -f images/*.ps images/*.pdf images/*.eps mail.tgz: $(wildcard *.tex) $(SOURCE_IMG) $(PNG_IMG) Makefile ChangeLog \ $(wildcard ../images/*.png) $(wildcard ../commons/*.tex) \ ../commons/biblio.bib tar -f $@ -cz $^