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