Correct Makefile

This commit is contained in:
flyingscorpio@clevo 2022-06-28 09:35:02 +02:00
parent cdc1e7e05a
commit 9013ed545e

View file

@ -1,14 +1,22 @@
filename=$(shell basename $(shell pwd))
timestamp=$(shell date +%Y-%m-%d_%H:%M)
all: snapshot
all: sujet1 oral
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; \
sujet1: sujet1.tex
@latexmk -pdf sujet1.tex
@if ! cmp --silent build/sujet1.pdf sujet1_*.pdf; then \
touch sujet1_tmp.pdf; \
rm sujet1*.pdf; \
cp build/sujet1.pdf sujet1_${timestamp}.pdf; \
echo "Updated"; \
fi
oral: oral.tex
@latexmk -pdf oral.tex
@if ! cmp --silent build/oral.pdf oral_*.pdf; then \
touch oral_tmp.pdf; \
rm oral*.pdf; \
cp build/oral.pdf oral_${timestamp}.pdf; \
echo "Updated"; \
fi