summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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