From f851b5e00df7a5cc07335def23891e3a7c99c7bf Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 9 Jan 2017 15:39:25 -0500 Subject: Bring back some features of the Makefile. --- Makefile | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 352236b..678274e 100644 --- a/Makefile +++ b/Makefile @@ -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: -- cgit v1.2.3-54-g00ecf