summary refs log tree commit diff
path: root/doc/Makefile
blob: a259015e861c883146e2722e56b44eb8da3661eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.PHONY: all clean

all: html/abi.html html/il.html

clean:
	rm -fr html

html/%.html: %.txt
	mkdir html 2> /dev/null || true
	( echo '<!doctype html>'; \
	  echo '<link rel="stylesheet"' \
	  	'href="http://c9x.me/css/simple.css"' \
	  	'type="text/css" />'; \
	  sed -ne '2{s,.*,<title>&</title>,;p;q}' $<; \
	  echo '<div class="container">'; \
	  sed -ne '2{s,.*,<h2>&</h2>,;p;q}' $<; \
	  sed -e '1,3d' $< | ocaml txt.ml; \
	  echo '</div>'; \
	) > $@