X-Git-Url: https://code.communitydata.science/uw_tex_letterhead.git/blobdiff_plain/fd870ead08d8d774cf469a2dc7b681c14a92cad9..2fc2a05e5430b2d0480a00c8708bb60710b37980:/Makefile diff --git a/Makefile b/Makefile index 5dd4d5b..4a26058 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,27 @@ -.RECIPEPREFIX += -TARGET = letter.pdf -SIGIMAGE = figures/signature.png.gpg +#!/usr/bin/make -all: $(TARGET) +ENC_SIGIMAGE = figures/signature.pdf.gpg +DEC_SIGIMAGE = figures/signature.pdf +# to use encrypted signatures files, add "figures/signature.pdf" (no +# quotes) right before the first $( in the following line: +all: $(patsubst %.tex,%.pdf,$(wildcard *.tex)) -$(TARGET): update-sig main.pdf - mv main.pdf letter.pdf +figures/signature.pdf: + gpg --yes --output $(DEC_SIGIMAGE) --decrypt $(ENC_SIGIMAGE) +%.pdf: %.tex + latexmk -f -xelatex $< -main.pdf: - rubber -m xelatex main.tex - - -update-sig: - gpg --yes --output figures/signature.png --decrypt $(SIGIMAGE) +clean: + latexmk -C *.tex + $(RM) -f *.tmp *.run.xml + # to use encrypted signature files, uncomment the following line + # $(RM) -f $(DEC_SIGIMAGE) +viewpdf: all + evince *.pdf -clean: - rubber -m xelatex --clean main.tex && $(RM) $(TARGET) && $(RM) figures/signature.png +pdf: all +.PHONY: clean all update-sig