aboutsummaryrefslogtreecommitdiffstats
path: root/2012/Makefile
blob: 2b3113cebc05317c74cfb6cacc9ac634eea61aca (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# 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'

minutes6 = 2012-04-21-member-notes
minutes5 = 2012-04-19-board
minutes4 = 2012-03-15-board
minutes3 = 2012-03-04-annual
minutes2 = 2012-02-27-board
minutes1 = 2012-01-19-board

all: $(minutes6).pdf $(minutes5).pdf $(minutes4).pdf $(minutes3).pdf $(minutes2).pdf $(minutes1).pdf

$(minutes6).pdf: $(minutes6).tex ../preamble/preamble.tex
	pdflatex $(minutes6).tex
	latex_count=5 ; \
	while egrep -s 'Rerun (LaTeX|to get cross-references right)' $(minutes6).log && [ $$latex_count -gt 0 ] ;\
	   do echo "Rerunning latex...." ;  pdflatex $(minutes6).tex;  latex_count=`expr $$latex_count - 1`; done
$(minutes5).pdf: $(minutes5).tex ../preamble/preamble.tex
	pdflatex $(minutes5).tex
	latex_count=5 ; \
	while egrep -s 'Rerun (LaTeX|to get cross-references right)' $(minutes5).log && [ $$latex_count -gt 0 ] ;\
	   do echo "Rerunning latex...." ;  pdflatex $(minutes5).tex;  latex_count=`expr $$latex_count - 1`; done
$(minutes4).pdf: $(minutes4).tex ../preamble/preamble.tex
	pdflatex $(minutes4).tex
	latex_count=5 ; \
	while egrep -s 'Rerun (LaTeX|to get cross-references right)' $(minutes4).log && [ $$latex_count -gt 0 ] ;\
	   do echo "Rerunning latex...." ;  pdflatex $(minutes4).tex;  latex_count=`expr $$latex_count - 1`; done
$(minutes3).pdf: $(minutes3).tex ../preamble/preamble.tex ../by-laws/by-laws-2012.tex ../operational-plans/operational-plan-2012.tex ../annual-reports/annual-report-2012.tex
	pdflatex $(minutes3).tex
	latex_count=5 ; \
	while egrep -s 'Rerun (LaTeX|to get cross-references right)' $(minutes3).log && [ $$latex_count -gt 0 ] ;\
	   do echo "Rerunning latex...." ;  pdflatex $(minutes3).tex;  latex_count=`expr $$latex_count - 1`; done
$(minutes2).pdf: $(minutes2).tex ../preamble/preamble.tex
	pdflatex $(minutes2).tex
	latex_count=5 ; \
	while egrep -s 'Rerun (LaTeX|to get cross-references right)' $(minutes2).log && [ $$latex_count -gt 0 ] ;\
	   do echo "Rerunning latex...." ;  pdflatex $(minutes2).tex;  latex_count=`expr $$latex_count - 1`; done
$(minutes1).pdf: $(minutes1).tex ../preamble/preamble.tex
	pdflatex $(minutes1).tex
	latex_count=5 ; \
	while egrep -s 'Rerun (LaTeX|to get cross-references right)' $(minutes1).log && [ $$latex_count -gt 0 ] ;\
	   do echo "Rerunning latex...." ;  pdflatex $(minutes1).tex;  latex_count=`expr $$latex_count - 1`; done

 # Sends to fripost.org for publication
send:
	umask 022
	rsync -ruvp --chmod=Dugo+rx,Fugo+r *.pdf fripost@fripost.org:fripost.org/minutes/

# Debuging and testing
send-test: test.d/test
	umask 022
	rsync -ruvp --chmod=Dugo+rx,Fugo+r test.d/ fripost@fripost.org:fripost.org/minutes/
test.d/test: test.d
	echo This is the test file for fripost-web. > test.d/test
test.d:
	mkdir test.d

# Clean up
clean:
	rm *.aux *.bbl *.dvi *.log *.nav *.out *.snm *.toc *~; rm -f test test.d/test; rmdir test.d