Small update in makefile and content
[ai-gitflashtalk.git] / Makefile
index 461a8af..9ef0328 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,25 @@
-SHELL:=/bin/bash
+TEX:=pdflatex
 
-all: vc.tex git.pdf
+.PHONY: clean clobber images
 
-git.pdf: git.tex vc.tex
-       pdflatex $< 
-       pdflatex $<
+git.pdf: git.tex preamble.fmt
+       $(TEX) $< 
+       grep -q "rerunfilecheck Warning:.*$(basename $<).out" $(basename $<).log &&\
+               $(TEX) $< || true
+
+preamble.fmt: preamble.tex vc.tex
+       $(TEX) -ini -jobname="$(basename $@)" "&$(TEX) $<\dump"
+
+images:
+       wget -qO- http://www.androidworld.it/wp-content/uploads/2014/02/linus-torvalds-getty-final.jpg\
+               | convert -resize 10\% - - > 1.png
+       wget -qO2.png http://blog.osteele.com/images/2008/git-transport.png
 
 vc.tex: .git/logs/HEAD
-       git log -1 --format="format:\\gdef\\GITAbrHash{%H}" > vc.tex
+       git log -1 --format="format:\\gdef\\GITAbrHash{%H}" > $@
 
 clean:
-       $(RM) -v git.{eps,aux,bbl,blg,dvi,log,out,toc,nav,snm,pdf} vc.tex
+       $(RM) -v $(addprefix *.,vrb eps aux fmt bbl blg dvi log out toc nav snm) vc.tex
+
+clobber: clean
+       $(RM) -v *.pdf $(addsuffix .png,1 2)