summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 807cb2779ef43ac6524c98deeff22c08de0bac33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
ORG_POSTS  := $(shell find site/ -name "*.org")
COQ_POSTS  := $(shell find site/ -name "*.v")
POSTS      := $(ORG_POSTS:.org=.html) $(COQ_POSTS:.v=.html)

COQCARGS   := -async-proofs-cache force

build: ${POSTS}
	@soupault
	@scripts/update-gitignore.sh ${POSTS}

clean:
	rm -f ${POSTS}
	rm -rf build

force: clean build

%.html: %.v
	@echo "export $*.v"
	@coqc ${COQCARGS} $*.v
	@coqdoc --no-index --charset utf8 --short --body-only -d site/posts/ \
	        --coqlib "https://coq.inria.fr/distrib/current/stdlib/" \
	        $*.v
	@sed -i -e 's/href="$(shell basename $*.html)\#/href="\#/g' $*.html
	@rm -f site/posts/coqdoc.css

%.html: %.org
	@echo "export $*.org"
	@emacs $< --batch --eval "(setq org-html-htmlize-output-type nil)" --eval "(org-html-export-to-html nil nil nil t)" --kill

.PHONY: clean build force