summaryrefslogtreecommitdiffstats
path: root/flyers/event-info/Makefile
blob: 037181e3b6b90f2a6eafb0fea01c6f98fc4a871c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

ALL = \
  event-info-single.pdf \
  event-info.pdf \

SEND_FILES = $(ALL)

all: $(ALL)

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

event-info-single.pdf: master.tex flygblad-lagring-foer-delning-2018.pdf
	jobname=$(basename $@) ;\
	log=$(addsuffix .log, $(basename $@)) ;\
	count=5 ;\
	pdflatex -jobname $$jobname $< ;\
	while egrep -s 'Rerun (LaTeX|to get cross-references right)' $$log && [ $$count -gt 0 ] ;\
	   do echo "Rerunning latex...." ;  pdflatex -jobname $$jobname $<  ;\
	   count=`expr $$count - 1`;\
	done;

# General cases

%.pdf: %-single.pdf
	pdftk $< cat 1 1 output $@

%.pdf: %.odt
	libreoffice --headless "-env:UserInstallation=file:///tmp/lo-$$" --convert-to pdf $<

%.png: %.pdf
	convert $< $@

# Sends to fripost.org for publication

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

clean:
	rm -fr $(ALL)

SHELL = /bin/bash