diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-23 11:15:01 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-23 11:15:01 -0400 |
commit | 34a39cd6f147b47c03e8a0296ae54593bd023bc0 (patch) | |
tree | da36ba295fa3815351de3b49b0ef3fb43cc8eb6d | |
parent | ca5e4c1f42103df8cb16ab91029f4eacc203d76a (diff) |
Makefile: add 'serve' target, add commentsnoah
-rw-r--r-- | Makefile | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -1,4 +1,21 @@ +# Set the default target ####################################################### +phony += all +all: + +# Boilerplate ################################################################## SHELL = bash +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-% + +# Real rules to actually make the website ###################################### + RUBYLIB=$(realpath .)/lib export RUBYLIB @@ -43,15 +60,17 @@ var-%: out/%.css: src/%.scss scss -s < $< > $@ -.DELETE_ON_ERROR: -.SECONDARY: - +# Recurse into the logos folder ################################################ outdir=out/logos srcdir=src/logos topoutdir=out topsrcdir=src include src/logos/Makefile +# Boilerplate ################################################################## + +.PHONY: $(phony) + define nl |