efrei/droit-travail/exercices/Makefile

52 lines
1.2 KiB
Makefile
Raw Normal View History

2021-09-22 17:21:24 +02:00
timestamp=$(shell date +%Y-%m-%d_%H:%M)
2021-11-23 18:04:39 +01:00
all: tp1 tp2 tp3 tp4 exercice-note
2021-09-22 17:21:24 +02:00
2021-11-20 14:31:47 +01:00
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; \
2021-09-22 17:21:24 +02:00
echo "Updated"; \
fi
2021-11-20 14:31:47 +01:00
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; \
2021-09-30 19:53:48 +02:00
echo "Updated"; \
fi
2021-11-20 14:57:35 +01:00
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
2021-11-23 13:16:58 +01:00
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
2021-11-23 18:04:39 +01:00
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
2021-09-22 17:21:24 +02:00
clean:
@rm -rf build 2>/dev/null