+#!/usr/bin/make
.RECIPEPREFIX +=
-TARGET = letter.pdf
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)
+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