summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-04-23 11:15:01 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-04-23 11:15:01 -0400
commit34a39cd6f147b47c03e8a0296ae54593bd023bc0 (patch)
treeda36ba295fa3815351de3b49b0ef3fb43cc8eb6d
parentca5e4c1f42103df8cb16ab91029f4eacc203d76a (diff)
Makefile: add 'serve' target, add commentsnoah
-rw-r--r--Makefile25
1 files changed, 22 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 3f52318..a22048d 100644
--- a/Makefile
+++ b/Makefile
@@ -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