TARGET = proposal.tex CV_PubList_Kohlhase.tex TARGET.pdf = $(TARGET:%.tex=%.pdf) PDFLATEX = pdflatex -interaction nonstopmode -file-line-error all: $(TARGET.pdf) $(TARGET.pdf): %.pdf: %.tex $(PDFLATEX) $< || $(RM) $@ @echo @if (test -e $(patsubst %.tex, %.idx, $<));\ then makeindex $(patsubst %.tex, %.idx, $<); fi @echo @if (grep "(re)run BibTeX" $(patsubst %.tex, %.log, $<)> /dev/null);\ then bibtex $(patsubst %.tex, %, $<); bibtex $(patsubst %.tex, %1-blx, $<);fi @echo $(PDFLATEX) $< || $(RM) $@ @echo @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\ then $(PDFLATEX) $< || $(RM) $@; fi @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\ then $(PDFLATEX) $< || $(RM) $@; fi echo: echo $(TARGET.pdf)