timestamp=$(shell date +%Y-%m-%d_%H:%M) all: tp tp: tp.tex @latexmk -pdf tp.tex @if ! cmp --silent build/tp.pdf tp_*.pdf; then \ touch tp_tmp.pdf; \ rm tp*.pdf; \ cp build/tp.pdf tp_belghith_franken_${timestamp}.pdf; \ echo "Updated"; \ fi clean: @rm -rf build 2>/dev/null