From de08ff37292aaba7544543e81d4a3f82719f0182 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Wed, 19 Feb 2020 03:30:14 +0000 Subject: Automate make all New entries now don't need to be added to the Makefile manually; it scans the cover-letters directory for `.tex` files automatically. Honestly, I'm not sure how this is working. The `$(shell ...)` line prefixes all of its results with `cover-letter/`, but the PDF versions are generated without this prefix. This might cause issues later. --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 84f491b..3fe520a 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,14 @@ .PHONY: default all clean +TEX=$(shell ls cover-letters/*.tex) +PDF=$(TEX:.tex=.pdf) + +test: + echo $(TEX) $(PDF) + default: all -all: cv.pdf mythic-beasts.pdf thekla.pdf zachtronics.pdf cs.pdf factorio.pdf \ - fetchai.pdf +all: $(PDF) %.pdf: cover-%.pdf cv.pdf pdfmarks gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile="$@" $^ -- cgit v1.2.1