summaryrefslogtreecommitdiffstats
path: root/flyers/mayday/Makefile
blob: f9b14525142cb7f93c025fac10d9301d4c301463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
SHELL=/bin/bash

all: fripost-mayday-flyer.pdf

SEND_FILES = *.pdf *.png

fripost-mayday-flyer.pdf: fripost-mayday-flyer-single.pdf
	pdftk $< cat 1 1 output $@

fripost-mayday-flyer-single.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/') $@


send:
	rsync -ruvp --chmod=Dugo+rx,Fugo+r $(SEND_FILES) www.fripost.org:/var/www/fripost.org/material/
	@echo; echo Now avialable as; for f in $(SEND_FILES); do echo " - https://fripost.org/material/$$f"; done