efrei/logique-programmable/exercices/Makefile

24 lines
561 B
Makefile

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