blob: 45f1de587244ccee943ba65c4064377dd03201fb (
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
26
|
TOOL := ../code/target/debug/blog-tool
TOOLC := $(TOOL) --root=articles
SRC_ARTICLES := $(shell find articles -type f)
OUT_ARTICLES := $(SRC_ARTICLES:articles/%.md=out/%)
ALL = $(OUT_ARTICLES) out/index out/feed.atom out/.index
all: $(ALL)
out/.index:
ln -sf index out/.index
out/style.css: style.css
cp $< $@
out/index: $(TOOL) $(SRC_ARTICLES)
$(TOOLC) render-index > $@
out/feed.atom: $(TOOL) $(SRC_ARTICLES)
$(TOOLC) generate-atom > $@
out/%: articles/%.md $(TOOL) out/style.css
$(TOOLC) render-article $< > $@
$(TOOL): $(shell find ../code/src -type f)
sh -c 'cd ../code; cargo build'
clean:
rm $(ALL)
|