blob: 3b8a21c6175d83bb7f68eef9a12095cd80d1064b (
plain) (
blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
.PHONY: check clean serve
gendeps = ${filter-out %/index.html,${wildcard ${1}/*}}
includes := ${wildcard include/*}
srcdirs := ${shell find src -type d}
outdirs := ${srcdirs:src%=out%}
sources := ${shell find src -type f -regextype egrep -regex '.*/(index\.html|.*\.(css|svg|png|dot))'}
outputs := ${sources:src/%=out/%}
outputs := ${outputs:%.dot=%.svg}
all: ${outdirs} ${outputs} fonts
@cp -r fonts out
@printf 'CP\tfonts\n'
${outdirs}:
@mkdir -p $@
@printf 'MKDIR\t%s\n' "$@"
out/%: src/%
@cp $< $@
@printf 'CP\t%s\n' "$@"
out/%.svg: src/%.dot
@dot -Tsvg $< >$@
@printf 'DOT\t%s\n' "$@"
out/%.html: src/%.html ${includes} src/style.css
@PATH="$$PATH:./include" m4 -P ${foreach dir,${^D},-I${dir}} include/lib.m4 $< >$@
@printf 'M4\t%s\n' "$@"
src/srp/fw-ec/index.html: ${call gendeps,src/srp/fw-ec}
@touch $@
src/prj/mmv/index.html: ${call gendeps,src/prj/mmv}
@touch $@
src/prj/mkpass/index.html: ${call gendeps,src/prj/mkpass}
@touch $@
check:
LANG=en_US.UTF-8 find src -name 'index.html' -exec \
aspell --home-dir=./ --ignore-case check {} \;
clean:
rm -rf out
serve:
darkhttpd out --daemon
|