efrei/scripting/powershell/Makefile

17 lines
406 B
Makefile
Raw Normal View History

2022-07-06 16:34:20 +02:00
filename=$(shell basename $(shell pwd))
timestamp=$(shell date +%Y-%m-%d_%H:%M)
2022-07-08 08:25:40 +02:00
all: exercice
2022-07-06 16:34:20 +02:00
2022-07-08 08:25:40 +02:00
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; \
2022-07-06 16:34:20 +02:00
echo "Updated"; \
fi
clean:
@rm -rf build 2>/dev/null