2022-01-17 15:14:44 +01:00
|
|
|
filename=$(shell basename $(shell pwd))
|
|
|
|
timestamp=$(shell date +%Y-%m-%d_%H:%M)
|
|
|
|
|
2022-03-07 09:42:19 +01:00
|
|
|
all: snapshot exercices dm1 controle1
|
2022-01-17 15:14:44 +01:00
|
|
|
|
|
|
|
snapshot: main.tex
|
|
|
|
@latexmk -pdf main.tex
|
|
|
|
@if ! cmp --silent build/main.pdf ${filename}_*.pdf; then \
|
|
|
|
touch ${filename}_tmp.pdf; \
|
|
|
|
rm ${filename}*.pdf; \
|
|
|
|
cp build/main.pdf ${filename}_${timestamp}.pdf; \
|
|
|
|
echo "Updated"; \
|
|
|
|
fi
|
|
|
|
|
2022-02-08 13:25:25 +01:00
|
|
|
exercices: exercices.tex
|
|
|
|
@latexmk -pdf exercices.tex
|
|
|
|
@if ! cmp --silent build/exercices.pdf exercices_*.pdf; then \
|
|
|
|
touch exercices_tmp.pdf; \
|
|
|
|
rm exercices*.pdf; \
|
|
|
|
cp build/exercices.pdf exercices_${timestamp}.pdf; \
|
|
|
|
echo "Updated"; \
|
|
|
|
fi
|
|
|
|
|
2022-02-14 15:53:46 +01:00
|
|
|
dm1: dm1.tex
|
2022-02-14 13:31:50 +01:00
|
|
|
@latexmk -pdf dm1.tex
|
|
|
|
@if ! cmp --silent build/dm1.pdf dm1_*.pdf; then \
|
|
|
|
touch dm1_tmp.pdf; \
|
|
|
|
rm dm1*.pdf; \
|
|
|
|
cp build/dm1.pdf dm1_${timestamp}.pdf; \
|
|
|
|
echo "Updated"; \
|
|
|
|
fi
|
|
|
|
|
2022-03-07 09:42:19 +01:00
|
|
|
controle1: controle1.tex
|
|
|
|
@latexmk -pdf controle1.tex
|
|
|
|
@if ! cmp --silent build/controle1.pdf controle1_*.pdf; then \
|
|
|
|
touch controle1_tmp.pdf; \
|
|
|
|
rm controle1*.pdf; \
|
|
|
|
cp build/controle1.pdf controle1_${timestamp}.pdf; \
|
|
|
|
echo "Updated"; \
|
|
|
|
fi
|
|
|
|
|
2022-01-17 15:14:44 +01:00
|
|
|
clean:
|
|
|
|
@rm -rf build 2>/dev/null
|