SOURCE_IMG = $(wildcard images/*.dia) PS_IMG = $(SOURCE_IMG:.dia=.ps) EPS_IMG = $(SOURCE_IMG:.dia=.eps) PDF_IMG = $(SOURCE_IMG:.dia=.pdf) SOURCE = corso.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) all: $(PDF_IMG) $(PNG_EPS_IMG) corso.pdf corso.pdf: $(TEXFILES) pdflatex $(@:.pdf=.tex) makeindex $(@:.pdf=.idx) bibtex $(@:.pdf=.aux) pdflatex $(@:.pdf=.tex) pdflatex $(@:.pdf=.tex) $(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 corso.tgz: $(wildcard *.tex) $(SOURCE_IMG) $(PNG_IMG) biblio.bib Makefile ChangeLog $(wildcard ../images/*.png) $(wildcard ../commons/*.tex) tar -f $@ -cz $^