summary refs log tree commit diff
path: root/doc/Makefile
blob: e1b93eb1edac1531a1d2ae2fcb4f1b3faff2603d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
DOCS = abi il llvm

all: $(DOCS:%=html/%.html)

clean:
	rm -fr html

html/%.html: %.txt
	mkdir html 2> /dev/null || true
	( 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/txt.ml; \
	  echo '</div>'; \
	) > $@

.PHONY: all clean