summaryrefslogtreecommitdiffhomepage
path: root/GNUmakefile
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-02-22 21:38:57 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-02-22 21:38:57 +0100
commit3ee8a6dbcdc3c8afaea2b83fdc2437b8868c60d1 (patch)
tree4a8d8a47b935a78bfcc43f959563f89c37e0b193 /GNUmakefile
Import some basic files
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..852c272
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,26 @@
+.PHONY: check clean serve watch
+
+MAKEFLAGS := -j$(shell nproc)
+export PATH := $(PATH):./bin
+export LANG := en_US.UTF-8
+
+srcs := $(shell find src -type f -name 'index.gsp')
+dsts := $(srcs:%.gsp=%.html)
+
+all: $(dsts)
+
+%.html: %.gsp
+ m4 -P -Iinclude m4/* $< | gsp >$@
+
+check:
+ find src -name '*.gsp' -exec \
+ aspell --home-dir=./ --ignore-case check {} \;
+
+clean:
+ find . -name '*.html' -delete
+
+serve:
+ darkhttpd src --daemon
+
+watch:
+ git ls-files --others | entr -n $(MAKE)