blob: 678274e8b7d673f051a12ddf4a046cac1e439c06 (
plain)
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
|
MAKEFLAGS += -j1
# Default target
all: out/index.html
.PHONY: all
# For real files, just let the ./make script take care of it.
$(sort out/index.html $(MAKECMDGOALS)): FORCE
./make
# Development server
serve: serve-8000
serve-%: all
dir=$$(mktemp -d -t) && trap 'fusermount -u "$$dir"; rmdir "$$dir"' EXIT && unionfs -o ro out:src "$$dir" && (cd "$$dir" && python3 -m http.server $*)
.PHONY: serve serve-%
# Clean
clean:
rm -rf out
.PHONY: clean
# Boilerplate
.PHONY: FORCE
.DELETE_ON_ERROR:
.SECONDARY:
|