.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