SHELL := bash .SHELLFLAGS := -eu -o pipefail -c .ONESHELL: .DELETE_ON_ERROR: MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --no-builtin-rules LATEX_CMD = latexmk -lualatex --halt-on-error --synctex=1 --output-directory=out .PHONY: clean clean_fonts all # create output folder! $(info $(shell mkdir -p out)) all: out/cv_letter.pdf out/cv.pdf out/base.pdf: base.tex cv_base.cls fonts/sentinel ${LATEX_CMD} base.tex out/cv.pdf: cv.tex cv_base.cls cv.cls fonts/sentinel ${LATEX_CMD} cv.tex out/cv_letter.pdf: cv_letter.tex cv_base.cls cv_letter.cls fonts/sentinel ${LATEX_CMD} cv_letter.tex fonts/sentinel: mkdir -p fonts fc-list | grep -E 'Lato-|DejaVu' | grep -v -- "-minimal" | cut -d : -f 1 | xargs -I{} bash -c 'ln -fs {} fonts/$$(basename {})' touch fonts/sentinel clean: rm -rf out clean_fonts: rm -rf fonts/