Src=w1-v1 all : dirs tex bib tex tex done one : dirs tex done done : cp $(HOME)/tmp/$(Src).pdf ./ grep arning $(HOME)/tmp/$(Src).log dirs : - [ ! -d $(HOME)/tmp ] && mkdir $(HOME)/tmp tex : - pdflatex -output-directory=$(HOME)/tmp $(Src) bib : - bibtex $(HOME)/tmp/$(Src)