From 5b4d4b3400acdace76f5970849fcb7f9cefd2c4d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 30 Jul 2023 04:15:05 +0200 Subject: Genesis commit Not ready for release yet, but I need some commits for M4 to work properly. --- Makefile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3