libqbe/doc/Makefile

28 lines
700 B
Makefile
Raw Normal View History

2016-03-17 13:01:46 -04:00
.PHONY: all clean sync
2016-03-08 21:17:01 -05:00
2016-03-23 21:56:15 -04:00
DOCS = abi il llvm
2016-03-09 10:11:10 -05:00
2016-03-09 14:32:35 -05:00
all: $(DOCS:%=html/%.html) html/txt.css
html/txt.css: txt/txt.css
cp -f $< $@
2016-03-08 21:17:01 -05:00
clean:
rm -fr html
html/%.html: %.txt
mkdir html 2> /dev/null || true
2016-03-08 21:23:48 -05:00
( echo '<!doctype html>'; \
2016-10-19 11:24:11 -04:00
echo '<meta name=viewport content="width=device-width, initial-scale=1">'; \
2016-11-09 22:34:05 -05:00
echo '<link rel="stylesheet" href="/css/simple.css" type="text/css" />'; \
2016-03-09 14:33:51 -05:00
echo '<link rel="stylesheet" href="txt.css" type="text/css" />'; \
2016-03-08 21:56:32 -05:00
sed -ne '2{s,.*,<title>&</title>,;p;q}' $<; \
2016-03-08 21:17:01 -05:00
echo '<div class="container">'; \
sed -ne '2{s,.*,<h2>&</h2>,;p;q}' $<; \
2016-03-09 14:32:35 -05:00
sed -e '1,3d' $< | ocaml txt/txt.ml; \
2016-03-08 21:17:01 -05:00
echo '</div>'; \
) > $@
2016-03-17 13:01:46 -04:00
sync:
scp html/* h:/srv/data/w/compile/doc/