diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -52,9 +52,10 @@ out/index.atom : $(bin/index) bin/index.atom.erb .var.html.src $(html.src) bin/ out/%/index.atom: $(bin/index) bin/index.atom.erb .var.html.src $(html.src) bin/write-atomic bin/index atom '$(mydir)' $(filter $(patsubst out%,src%,$(@D))/%,$^) | bin/write-atomic $@ -www: FORCE - @mkdir -p $@ - unionfs -o ro out:src www +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-% .var.%: FORCE bin/write-ifchanged @printf '%s' $(call quote.shell,$($*)) | sed 's/^/#/' | bin/write-ifchanged $@ |