aboutsummaryrefslogtreecommitdiffstats
path: root/annual-meetings/motions/Makefile
diff options
context:
space:
mode:
authorGustav Eek <gustav.eek@fripost.org>2020-11-23 15:43:18 +0100
committerGustav Eek <gustav.eek@fripost.org>2020-11-23 15:43:18 +0100
commit423f3e06bbfbd44181a84208f3e000c69742c310 (patch)
tree0aa185c24d5bb29174b2341cc9ec8512ba4c93ec /annual-meetings/motions/Makefile
parente6661691aab2755b45d0ab56d138741c226e04ac (diff)
parent04996061842231770f05d5ad9690bd5e556eab85 (diff)
Merge branch '2020-05-10-annual' into master
Diffstat (limited to 'annual-meetings/motions/Makefile')
-rw-r--r--annual-meetings/motions/Makefile25
1 files changed, 22 insertions, 3 deletions
diff --git a/annual-meetings/motions/Makefile b/annual-meetings/motions/Makefile
index cd0204d..683f2f4 100644
--- a/annual-meetings/motions/Makefile
+++ b/annual-meetings/motions/Makefile
@@ -1,10 +1,29 @@
-TEX = $(addsuffix _.tex, $(basename $(shell ls *.mdwn)))
-ALL = $(TEX)
+PREFIX = motions
+TEX = $(addsuffix _.tex, $(basename $(wildcard *.mdwn)))
+PDF = $(addprefix $(PREFIX)-, $(subst .main.tex,.pdf,$(wildcard *.main.tex)))
+ALL = $(TEX) $(PDF)
+
+PREAMBLE = preamble_.tex acronyms_.tex attendants_.tex
all: $(ALL)
%_.tex: %.mdwn
- cat < $< | sed -e 's/SCB/\\scb\\/g' -e 's/^$$/\\mypar\n/' | pandoc -f markdown -t latex > $@
+ cat < $< | sed -e 's/^$$/\\mypar\n/' |\
+ sed -f ../../preamble/acronyms.sed \
+ -f ../../preamble/attendants.sed \
+ -f ../../preamble/snippets.sed |\
+ pandoc -f markdown -t latex > $@
+
+
+
+
+motions-%.pdf: %.main.tex $(TEX) $(PREAMBLE)
+ pdflatex -jobname=$(basename $@) $<
+ ! grep -q "Rerun.*right" $(basename $@).log ||\
+ pdflatex -jobname=$(basename $@) $<
clean:
rm -f $(ALL)
+
+$(PREAMBLE): %_.tex: ../../preamble/%.tex
+ sed 's/..\/preamble\/\([a-z]*\)/\1_/g' < $< > $@