summaryrefslogtreecommitdiffstats
path: root/2013/mayday/Makefile
blob: 7a748875830b4a4b4a36c0d24fc21dfc4358e410 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
SHELL=/bin/bash

flyer-1-may-2013.pdf: master.tex preamble.tex frontside.tex backside.tex
	latex_count=5 ;\
	latex_log=$$(echo $< | sed 's/.tex/.log/') ;\
	pdflatex $< ;\
	while egrep -s 'Rerun (LaTeX|to get cross-references right)' $$latex_log && [ $$latex_count -gt 0 ] ;\
	   do echo "Rerunning latex...." ;  pdflatex $< ;\
	   latex_count=`expr $$latex_count - 1`;\
	done;
	mv -v $$(echo $< | sed 's/.tex/.pdf/') $@