summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Kohl <gitlab@jonaskohl.de>2024-07-19 13:09:00 +0200
committerJonas Kohl <gitlab@jonaskohl.de>2024-07-19 13:09:00 +0200
commit3b9bb27ab9179334fe3c96ae8dbc249061649aff (patch)
treed7c612cbd9f0c3b337e0713c0507a1acae8e90c9 /Makefile
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3947888
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+SRCFILES:=$(shell find src/pages/ -type f -name '*.php')
+HTMLTARGETS:=$(SRCFILES:src/pages/%.php=build/%.html)
+
+.PHONY: build/static
+
+all: $(HTMLTARGETS) $(STATICFILES) build/static
+
+build/static:
+ rsync -rupE src/static build/
+
+build/%.html: src/pages/%.php src/template.php
+ @mkdir -p $(dir $@)
+ php expand.php < $< > $@
+
+clean:
+ rm -Rf build