BASENAME=lines-example TEXFILE=$(BASENAME).tex PDFFILE=$(BASENAME).pdf all: talk again watchtalk clean cleanup cleanplots help talk: $(PDFFILE) $(PDFFILE): $(TEXFILE) beamer*.sty pdflatex -interaction=scrollmode $< | tee /dev/stderr | fgrep -q "Rerun to get cross-references right" && pdflatex -interaction=scrollmode $< || true again : pdflatex $(TEXFILE) watchtalk : while true; do ! make -q talk && make talk; sleep 0.5; done clean : rm -f *~ rmtex $(BASENAME) rm -f $(PYTHONPDFFILES) cleanup : clean rm -f $(PDFFILE) help : @echo -e \ "make talk: make the pdf file of the talk.\n"\ "make again: run latex and make the pdf file of the talk,\n"\ " no matter whether you changed the .tex file or not.\n\n"\ "make watchtalk: make the pdf file of the talk\n"\ " whenever the tex file or the plots are modified.\n"\ "make clean: remove all intermediate files,\n"\ " just leave the source files and the final pdf file.\n"\ "make cleanup: remove all intermediate files as well as\n"\ " the final pdf file.\n"