aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2c9371f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+SPEC=spec.txt
+SITE=_site
+SPECVERSION=$(shell perl -ne 'print $$1 if /^version: *([0-9.]+)/' $(SPEC))
+
+.PHONY: spec update-site upload-site
+
+spec: spec.html # spec.pdf
+
+spec.md: $(SPEC)
+ python3 tools/makespec.py markdown > $@
+
+spec.html: spec.txt tools/template.html
+ python3 tools/makespec.py html > $@
+
+spec.pdf: spec.md tools/template.tex tools/specfilter.hs
+ pandoc -s $< --template tools/template.tex \
+ --filter tools/specfilter.hs -o $@ --latex-engine=xelatex --toc \
+ --number-sections -V documentclass=report -V tocdepth=2 \
+ -V classoption=twosides
+
+### Website ###
+
+update-site: spec
+ make -C $(SITE) update
+
+upload-site: spec
+ make -C $(SITE) upload