summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Harley2020-02-19 03:30:14 +0000
committerTom Harley2020-02-19 03:30:14 +0000
commitde08ff37292aaba7544543e81d4a3f82719f0182 (patch)
tree25d09e7c993af9262c465bd66ce4a3de99153300
parentAdd cover letter for CGI (diff)
downloadcv-de08ff37292aaba7544543e81d4a3f82719f0182.tar.gz
cv-de08ff37292aaba7544543e81d4a3f82719f0182.zip

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.

-rw-r--r--Makefile9
1 files 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="$@" $^