summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEthel Morgan <eth@ethulhu.co.uk>2020-07-06 18:23:10 +0100
committerEthel Morgan <eth@ethulhu.co.uk>2020-07-06 18:23:10 +0100
commitb1e6491f77421ae4623391a7f53af7f3e6c13f34 (patch)
treeacc4ce7ae214b92dbf2c269c70e94b68dac1d640 /Makefile
parent04be5845dbaa6f8dec45a80dbe199861608b96f2 (diff)
import website from previous repo
Diffstat (limited to '')
-rw-r--r--Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7f642d6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
+.PHONY: all clean
+
+HTML_PAGES = $(patsubst src/%.html,build/%.html,$(shell find src -name '*.html'))
+THRUST_PAGES = $(patsubst src/%.thrust,build/%.html,$(shell find src -name '*.thrust'))
+
+PAGES = $(HTML_PAGES) $(THRUST_PAGES)
+
+all: build/sitemap.xml $(PAGES)
+
+build/sitemap.xml: $(PAGES)
+ ./generate-sitemap $^ > $@
+
+build/%.html: src/%.html
+ @mkdir -p $(@D)
+ cp $< $@
+
+build/%.html: src/%.thrust templates/* thrust
+ @mkdir -p $(@D)
+ ./thrust $< > $@
+
+clean:
+ rm -rf build
+
+dev:
+ find . | entr $(MAKE) -j