X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topbloke-formulae.git;a=blobdiff_plain;f=Makefile;h=7a4f7d4f0dec6fe44aba5ee66feee96a205859e4;hp=0391a54176f7d05f5e14506c1673f71e8dd2d8c7;hb=9309c8e4f3576e2fe55af44ceda30728a031f913;hpb=3bacd8e20d8b182ded5005470c0116ef99795ca9 diff --git a/Makefile b/Makefile index 0391a54..7a4f7d4 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,27 @@ -article.ps: article.pdf - pdftops article.pdf article.ps +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 *~