SRCS := $(wildcard *.tex)
-default: article.pdf
+default: final.pdf
-article.pdf: $(SRCS)
+once: revid.inc
pdflatex -halt-on-error article.tex </dev/null
-article.ps: article.pdf
- pdftops article.pdf article.ps
+revid.inc: .git-revid $(SRCS) Makefile
+ ./$< >$@.new
+ cmp $@.new $@ || mv -f $@.new $@
+
+final.pdf: $(SRCS)
+ $(MAKE) once
+ $(MAKE) once
+ $(MAKE) once
+ cp article.pdf final.pdf
+
+%.ps: %.pdf
+ pdftops $*.pdf $*.ps
clean:
- rm -f *.aux *.log *.dvi *.out *.pdf *~
+ rm -f *.aux *.log *.dvi *.out *.pdf *.ps *~