]> code.communitydata.science - uw_tex_letterhead.git/blobdiff - Makefile
merge sayamindu's old repository with my new one
[uw_tex_letterhead.git] / Makefile
index 5dd4d5bd3c4f675ed9579117ecc73e2b58f7830d..1211cf32d878da70a2ead061d231718001bcf3cb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,23 @@
+#!/usr/bin/make
 .RECIPEPREFIX +=
 .RECIPEPREFIX +=
-TARGET = letter.pdf
 SIGIMAGE = figures/signature.png.gpg
 
 SIGIMAGE = figures/signature.png.gpg
 
-all: $(TARGET)
+all: $(patsubst %.tex,%.pdf,$(wildcard *.tex)) 
 
 
+%.pdf: update-sig %.tex 
+       latexmk -f -xelatex $<
 
 
-$(TARGET): update-sig main.pdf
-    mv main.pdf letter.pdf
-
-
-main.pdf:
-    rubber -m xelatex main.tex
-
-
-update-sig:
+<update-sig:
     gpg --yes --output figures/signature.png --decrypt $(SIGIMAGE)
 
     gpg --yes --output figures/signature.png --decrypt $(SIGIMAGE)
 
+clean: 
+       latexmk -C *.tex
+       $(RM) -f *.tmp *.run.xml
+       $(RM) -f figures/signature.png
+
+viewpdf: all
+       evince *.pdf
 
 
-clean:
-    rubber -m xelatex --clean main.tex && $(RM) $(TARGET) && $(RM) figures/signature.png
+pdf: all
 
 
+.PHONY: clean all

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