Correct Makefile
This commit is contained in:
parent
cdc1e7e05a
commit
9013ed545e
1 changed files with 16 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue