efrei/droit-travail/exercices/Makefile

16 lines
494 B
Makefile

timestamp=$(shell date +%Y-%m-%d_%H:%M)
texfile20210922=contrat-independant-romance-martin
all: 20210922
20210922: contrat-independant-romance-martin.tex
@latexmk -pdf ${texfile20210922}.tex >/dev/null 2>&1
@if ! cmp --silent build/${texfile20210922}.pdf ${texfile20210922}_*.pdf; then \
touch ${texfile20210922}_tmp.pdf; \
rm ${texfile20210922}*.pdf; \
cp build/${texfile20210922}.pdf ${texfile20210922}_${timestamp}.pdf; \
echo "Updated"; \
fi
clean:
@rm -rf build 2>/dev/null