aboutsummaryrefslogtreecommitdiffstats
path: root/operational-plans/Makefile
blob: 53650e6df0221fed9312236daa634de4e53cee11 (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
# Makefile for minutes with usual treatments, that is noting extra then just compilation.
#
# Gustav Eek 2011

noarg:
	echo -e '\nThis script do not run without arguments. Run for example:\n\n    make 2011-02-13-board-notes.pdf\n    make all\n'

all: \
  operational-plan-2017.pdf \
  operational-plan-2016.pdf \
  operational-plan-2013.pdf \
  operational-plan-2012.pdf

# Special cases

operational-plan-2017.pdf: operational-plan-2017-master.tex notes-plan-2017.tex
	pdflatex -jobname=$(basename $@) $<
	pdflatex -jobname=$(basename $@) $<

# General cases

operational-plan-%.pdf: operational-plan-%-master.tex operational-plan-%.tex
	pdflatex -jobname=$(basename $@) $<

%.pdf: %.main.tex %.tex ../preamble/preamble.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 $$(echo $< | sed 's/.tex/.pdf/') $@

send:
	rsync -ruvp --chmod=Dugo+rx,Fugo+r *.pdf "fripost@fripost.org:fripost.org/minutes/"


clean:
	rm *.aux *.bbl *.dvi *.log *.nav *.out *.snm *.toc *~