16 lines
361 B
Makefile
16 lines
361 B
Makefile
filename=cours-info
|
|
timestamped_file=$(shell date +%Y-%m-%d_%H:%M)
|
|
|
|
all: snapshot
|
|
|
|
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}_${timestamped_file}.pdf; \
|
|
echo "Updated"; \
|
|
fi
|
|
|
|
clean:
|
|
@rm -rf build 2>/dev/null
|