2023-03-09 13:33:15 +01:00
|
|
|
FILENAME := $(shell basename $(shell pwd))
|
|
|
|
TIMESTAMP := $(shell date +%Y-%m-%d_%H%M)
|
|
|
|
CURRENT_FILE := $(wildcard $(FILENAME)_*.pdf)
|
|
|
|
ifeq ($(strip $(CURRENT_FILE)),)
|
|
|
|
override CURRENT_FILE = bogus.pdf
|
|
|
|
endif
|
2023-01-23 16:40:05 +01:00
|
|
|
|
2023-03-09 13:33:15 +01:00
|
|
|
$(CURRENT_FILE): build/main.pdf
|
|
|
|
@rm -f $(CURRENT_FILE)
|
|
|
|
@cp build/main.pdf $(FILENAME)_$(TIMESTAMP).pdf
|
|
|
|
@echo Updated
|
2023-01-23 16:40:05 +01:00
|
|
|
|
2023-03-09 13:33:15 +01:00
|
|
|
build/main.pdf: main.tex
|
2023-01-23 16:40:05 +01:00
|
|
|
@latexmk -pdf main.tex
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@rm -rf build 2>/dev/null
|