X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topbloke-formulae.git;a=blobdiff_plain;f=Makefile;h=88cfc3b873c973fdd36bab1232b5e6de80edb954;hp=06554a21e071aaf9471db79fd1450227f023056c;hb=cb5a9d3227f121506751f47f098e53ced767a278;hpb=c64e0ac0cc6636944b2cdc30e28c18a73305c47a diff --git a/Makefile b/Makefile index 06554a2..88cfc3b 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,27 @@ -default: article.pdf +SRCS := $(wildcard *.tex) -article.pdf: article.tex - pdflatex -halt-on-error $< /dev/null) +HEADDEPS:=$(addprefix $(GITDIR), HEAD $(HEADREF)) + +revid.inc: .git-revid $(SRCS) Makefile $(HEADDEPS) + ./$< >$@.new + cmp $@.new $@ || mv -f $@.new $@ + +final.pdf: $(SRCS) revid.inc + $(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 *~