summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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