diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-07-30 04:15:05 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-07-30 04:15:05 +0200 |
commit | 5b4d4b3400acdace76f5970849fcb7f9cefd2c4d (patch) | |
tree | aba62cb24bee0f6e81434602571791b1945a78fb /Makefile |
Genesis commit
Not ready for release yet, but I need some commits for M4 to work
properly.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
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 |