efrei/probabilites-statistiques/Makefile

26 lines
567 B
Makefile
Raw Normal View History

2022-02-07 09:15:03 +01:00
filename=$(shell basename $(shell pwd))
timestamp=$(shell date +%Y-%m-%d_%H:%M)
2022-02-14 09:34:48 +01:00
all: snapshot td1
td1: td1.tex
@latexmk -pdf td1.tex
@if ! cmp --silent build/td1.pdf td1_*.pdf; then \
touch td1_tmp.pdf; \
rm td1*.pdf; \
cp build/td1.pdf td1_${timestamp}.pdf; \
echo "Updated"; \
fi
2022-02-07 09:15:03 +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
clean:
@rm -rf build 2>/dev/null