summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-09 16:18:43 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-09 16:18:43 -0500
commitf63a89bb8c494ea6b049285ec7c904d6d6136a88 (patch)
tree949d471514a8593fafe1be3560963ef96cf76861 /Makefile
parent39a34b63b0615002172e7db314e2caf663404e09 (diff)
fix Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 12 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 678274e..92c3868 100644
--- a/Makefile
+++ b/Makefile
@@ -2,24 +2,27 @@ MAKEFLAGS += -j1
# Default target
all: out/index.html
-.PHONY: all
+phony += all
-# For real files, just let the ./make script take care of it.
-$(sort out/index.html $(MAKECMDGOALS)): FORCE
- ./make
+# Boilerplate
+phony += FORCE
+.DELETE_ON_ERROR:
+.SECONDARY:
# 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-%
+phony += serve serve-%
# Clean
clean:
rm -rf out
-.PHONY: clean
+phony += clean
+
+# For real files, just let the ./make script take care of it.
+$(sort out/index.html $(filter-out $(phony),$(MAKECMDGOALS))): FORCE
+ ./make
# Boilerplate
-.PHONY: FORCE
-.DELETE_ON_ERROR:
-.SECONDARY:
+.PHONY: $(phony)