timestamped_file=$(shell date +%Y-%m-%d_%H:%M) all: ecrit oral ecrit: plaidoyer.tex @latexmk -pdf plaidoyer.tex @if ! cmp --silent build/plaidoyer.pdf plaidoyer_*.pdf; then \ touch plaidoyer_tmp.pdf; \ rm plaidoyer*.pdf; \ cp build/plaidoyer.pdf plaidoyer_${timestamped_file}.pdf; \ echo "Updated"; \ fi oral: presentation.tex @latexmk -pdf presentation.tex @if ! cmp --silent build/presentation.pdf presentation_*.pdf; then \ touch presentation_tmp.pdf; \ rm presentation*.pdf; \ cp build/presentation.pdf presentation_${timestamped_file}.pdf; \ echo "Updated"; \ fi clean: @rm -rf build 2>/dev/null