SHELL=bash TARGET=$(subst .tex,.pdf,$(wildcard opdracht*/opdracht*.tex) paper/paper.tex) all: $(TARGET) %.pdf : %.tex cd `dirname $<` && \ pdflatex -shell-escape `basename $<` && \ bibtex `basename -s .tex $<`.aux; \ pdflatex -shell-escape `basename $<` && \ pdflatex -shell-escape `basename $<` && \ cd ..