summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..da2a9b6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+.PHONY: check clean serve
+
+srcdirs := ${shell find src -type d}
+outdirs := ${srcdirs:src%=out%}
+sources := ${shell find src -type f -name 'index.html' -or -name '*.css' -or -name '*.svg'}
+outputs := ${sources:src/%=out/%}
+
+all: ${outdirs} ${outputs}
+
+${outdirs}:
+ @mkdir -p $@
+ @printf 'MKDIR\t%s\n' "$@"
+
+out/%: src/%
+ @cp $< $@
+ @printf 'CP\t%s\n' "$@"
+
+out/%.html: src/%.html include/head.html
+ @m4 -P ${foreach dir,${^D},-I${dir}} $< >$@
+ @printf 'M4\t%s\n' "$@"
+
+src/srp/fw-ec/index.html: src/srp/fw-ec/led.diff.html
+ @touch $@
+
+check:
+ LANG=en_US find src -name 'index.html' -exec \
+ aspell --home-dir=./ --ignore-case check {} \;
+
+clean:
+ rm -rf out
+
+serve:
+ darkhttpd out --daemon