]> code.communitydata.science - uw_tex_letterhead.git/blobdiff - Makefile
several cleanup steps
[uw_tex_letterhead.git] / Makefile
index 5dd4d5bd3c4f675ed9579117ecc73e2b58f7830d..3441f9b31bb223fde9275b481df9440ccbe075f1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,24 @@
-.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
 
+all: figures/signature.pdf $(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
+       $(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

Community Data Science Collective || Want to submit a patch?