efrei/droit-travail/exercices/Makefile

51 lines
1.2 KiB
Makefile

timestamp=$(shell date +%Y-%m-%d_%H:%M)
all: tp1 tp2 tp3 tp4 exercice-note
tp1: tp1.tex
@latexmk -pdf tp1.tex
@if ! cmp --silent build/tp1.pdf tp1_*.pdf; then \
touch tp1_tmp.pdf; \
rm tp1*.pdf; \
cp build/tp1.pdf tp1_${timestamp}.pdf; \
echo "Updated"; \
fi
tp2: tp2.tex
@latexmk -pdf tp2.tex
@if ! cmp --silent build/tp2.pdf tp2_*.pdf; then \
touch tp2_tmp.pdf; \
rm tp2*.pdf; \
cp build/tp2.pdf tp2_${timestamp}.pdf; \
echo "Updated"; \
fi
tp3: tp3.tex
@latexmk -pdf tp3.tex
@if ! cmp --silent build/tp3.pdf tp3_*.pdf; then \
touch tp3_tmp.pdf; \
rm tp3*.pdf; \
cp build/tp3.pdf tp3_${timestamp}.pdf; \
echo "Updated"; \
fi
tp4: tp4.tex
@latexmk -pdf tp4.tex
@if ! cmp --silent build/tp4.pdf tp4_*.pdf; then \
touch tp4_tmp.pdf; \
rm tp4*.pdf; \
cp build/tp4.pdf tp4_${timestamp}.pdf; \
echo "Updated"; \
fi
exercice-note: exercice-note.tex
@latexmk -pdf exercice-note.tex
@if ! cmp --silent build/exercice-note.pdf exercice-note_*.pdf; then \
touch exercice-note_tmp.pdf; \
rm exercice-note*.pdf; \
cp build/exercice-note.pdf exercice-note_${timestamp}.pdf; \
echo "Updated"; \
fi
clean:
@rm -rf build 2>/dev/null