aboutsummaryrefslogtreecommitdiffstats
path: root/by-laws/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'by-laws/Makefile')
-rw-r--r--by-laws/Makefile30
1 files changed, 14 insertions, 16 deletions
diff --git a/by-laws/Makefile b/by-laws/Makefile
index dbf6096..f18edbf 100644
--- a/by-laws/Makefile
+++ b/by-laws/Makefile
@@ -5,23 +5,21 @@
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'
-bylaws2 = by-laws-2012
-bylaws1 = by-laws-2010
+all: \
+by-laws-2013.pdf \
+by-laws-2012.pdf \
+by-laws-2010.pdf
-all: $(bylaws2).pdf $(bylaws1).pdf
-
-$(bylaws2).pdf: $(bylaws2).tex $(bylaws2).main.tex ../preamble/preamble.tex
- pdflatex $(bylaws2).main.tex
- latex_count=5 ; \
- while egrep -s 'Rerun (LaTeX|to get cross-references right)' $(bylaws2).main.log && [ $$latex_count -gt 0 ] ;\
- do echo "Rerunning latex...." ; pdflatex $(bylaws2).tex; latex_count=`expr $$latex_count - 1`; done
- mv $(bylaws2).main.pdf $@
-$(bylaws1).pdf: $(bylaws1).tex $(bylaws1).main.tex ../preamble/preamble.tex
- pdflatex $(bylaws1).main.tex
- latex_count=5 ; \
- while egrep -s 'Rerun (LaTeX|to get cross-references right)' $(bylaws1).main.log && [ $$latex_count -gt 0 ] ;\
- do echo "Rerunning latex...." ; pdflatex $(bylaws1).tex; latex_count=`expr $$latex_count - 1`; done
- mv $(bylaws1).main.pdf $@
+%.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/