aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 405fa3862c3544340a30185205cdf5e46232b6b9 (plain)
  1. SITE=_site
  2. SPECVERSION=$(shell perl -ne 'print $$1 if /^version: *([0-9.]+)/' spec.txt)
  3. .PHONY: all clean npm
  4. all: spec.html # spec.pdf spec.md
  5. spec.md: spec.txt tools/template.commonmark
  6. lua tools/make_spec.lua commonmark < $< > $@
  7. spec.html: spec.txt tools/template.html
  8. lua tools/make_spec.lua html < $< > $@
  9. spec.tex: spec.txt tools/template.latex
  10. lua tools/make_spec.lua latex < $< > $@
  11. spec.pdf: spec.tex
  12. xelatex $<
  13. npm:
  14. # Do a sanity check first on versions
  15. grep -q '"version": *"$(SPECVERSION)' package.json && \
  16. npm publish
  17. clean:
  18. -rm spec.tex spec.md spec.html