summaryrefslogtreecommitdiff
path: root/Makefile
blob: 7f642d62c96adeeac8f370ae7153bedde3323e8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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