blob: 7c7af1fa315cba2bfa1a5cd2deb69877ce5ea490 (
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
|
BUILD_DIR ?= build
MARKDOWNFILES = $(wildcard md/*.md)
HTMLTARGETS = $(MARKDOWNFILES:md/%.md=$(BUILD_DIR)/stories/%.html)
$(BUILD_DIR)/stories $(BUILD_DIR):
mkdir -p $@
$(BUILD_DIR)/stories/%.html: md/%.md | $(BUILD_DIR)/stories
pandoc "$<" \
--standalone \
--embed-resources \
--template template.html \
-o "$@"
$(BUILD_DIR)/index.html: gen/gen_index.sh | $(BUILD_DIR)
bash $< | pandoc \
--standalone \
--embed-resources \
--template template.html \
-o "$@"
all: make_dirs $(HTMLTARGETS) $(BUILD_DIR)/index.html
.PHONY: make_dirs all
|