efrei/art-disserter/Makefile

30 lines
708 B
Makefile

TIMESTAMP := $(shell date +%Y-%m-%d_%H%M)
CURRENT_SUJET1 := $(wildcard sujet1_*.pdf)
ifeq ($(strip $(CURRENT_SUJET1)),)
override CURRENT_SUJET1 = bogus_sujet1.pdf
endif
CURRENT_ORAL := $(wildcard oral_*.pdf)
ifeq ($(strip $(CURRENT_ORAL)),)
override CURRENT_ORAL = bogus_oral.pdf
endif
all: $(CURRENT_SUJET1) $(CURRENT_ORAL)
$(CURRENT_SUJET1): build/sujet1.pdf
@rm -f $(CURRENT_SUJET1)
@cp build/sujet1.pdf sujet1_${TIMESTAMP}.pdf; \
@echo Updated
$(CURRENT_ORAL): build/oral.pdf
@rm -f $(CURRENT_ORAL)
@cp build/oral.pdf oral_${TIMESTAMP}.pdf
@echo Updated
build/sujet1.pdf: sujet1.tex
@latexmk -pdf sujet1.tex
build/oral.pdf: oral.tex
@latexmk -pdf oral.tex
clean:
@rm -rf build 2>/dev/null