diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-09 15:39:25 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-09 15:39:25 -0500 |
commit | f851b5e00df7a5cc07335def23891e3a7c99c7bf (patch) | |
tree | 3dfd636cef7a47b48906c92ee4700e71867e2e59 /Makefile | |
parent | c8bb0015d0bee72d707686058e0585afdf3c5ffb (diff) |
Bring back some features of the Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -1,4 +1,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: |