efrei/droit-travail/exercices/Makefile

17 lines
478 B
Makefile
Raw Normal View History

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