efrei/cyber-attaque-defense/tp3/Makefile

18 lines
410 B
Makefile
Raw Permalink Normal View History

2024-01-17 09:23:00 +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
$(CURRENT_FILE): build/main.pdf
@rm -f $(CURRENT_FILE)
@cp build/main.pdf $(FILENAME)_$(TIMESTAMP).pdf
@echo Updated
build/main.pdf: main.tex
@latexmk -pdf main.tex
clean:
@rm -rf build 2>/dev/null