# HG changeset patch # User Daniele Nicolodi # Date 1634482348 -7200 # Node ID 608d784415700f228fa9d9759a3495434ee8704e # Parent 49001fa5195cb634617441d1e8945495c63eaee5 Makefile tweaks diff -r 49001fa5195c -r 608d78441570 makefile --- a/makefile Sun Oct 17 16:49:54 2021 +0200 +++ b/makefile Sun Oct 17 16:52:28 2021 +0200 @@ -1,9 +1,12 @@ SRC = cv BIB = publications.bib -all: $(SRC).pdf +# get last modification date +MDATE=$(shell stat -t "%Y%m%d" -f "%Sm" cv.tex publications.bib | sort -rn | head -1) -%.pdf: %.tex publications.bib +all: cv.pdf + +%.pdf: %.tex publications.bib cv.sty pdflatex -file-line-error -halt-on-error $(SRC).tex biber $(SRC) pdflatex $(SRC).tex @@ -11,3 +14,6 @@ clean: rm -f $(SRC)-blx.bib $(SRC).aux $(SRC).bbl $(SRC).blg $(SRC).log $(SRC).out $(SRC).pdf + +copy: + cp $(SRC).pdf nicolodi-cv-$(MDATE).pdf