16 lines
406 B
Makefile
16 lines
406 B
Makefile
filename=$(shell basename $(shell pwd))
|
|
timestamp=$(shell date +%Y-%m-%d_%H:%M)
|
|
|
|
all: exercice
|
|
|
|
exercice: exercice.tex
|
|
@latexmk -pdf exercice.tex
|
|
@if ! cmp --silent build/exercice.pdf exercice_${filename}*.pdf; then \
|
|
touch exercice_${filename}_tmp.pdf; \
|
|
rm exercice*.pdf; \
|
|
cp build/exercice.pdf exercice_${filename}_${timestamp}.pdf; \
|
|
echo "Updated"; \
|
|
fi
|
|
|
|
clean:
|
|
@rm -rf build 2>/dev/null
|