summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..282f4b7
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+
+MDWN = \
+ inquiries/2019-03-28-flfd.mdwn \
+ inquiries/cost-operation.mdwn \
+
+TMP = tmp
+
+ALL = \
+ pdf/2019-03-28-flfd.pdf \
+ odt/cost-operation.odt \
+ odt/cost-operation.pdf \
+
+all: pdf odt $(ALL)
+
+OPT_PANDOC = \
+ -f markdown \
+ -t latex \
+ -V documetclass=article -V classoption=twocolumn \
+
+
+pdf/2019-03-28-flfd.pdf: inquiries/2019-03-28-flfd.mdwn
+ cat $< | sed -f sed/latex.sed | pandoc $(OPT_PANDOC) -o $@
+
+odt/cost-operation.odt: inquiries/cost-operation.mdwn
+ cat $< | pandoc -s -f markdown -t odt -o $@
+
+PAR_CONV = \
+ --headless "-env:UserInstallation=file:///tmp/lo-$$$$" \
+ --convert-to pdf \
+ --outdir "$(abspath $(dir $@))" \
+
+%.pdf: %.odt
+ libreoffice $(PAR_CONV) "$<"
+
+
+pdf odt:
+ mkdir -p $@
+
+clean:
+ rm -fr pdf odt