blob: c60678a2900c63faed4bad7cd57e35e634a00178 (
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
27
28
|
BUILD_DIR = _build
MARKDOWNFILES != find md/ -type f -name "*.md"
HTMLTARGETS = $(MARKDOWNFILES:md/%.md=$(BUILD_DIR)/stories/%.html)
$(BUILD_DIR)/stories/%.html: md/%.md
pandoc "$<" \
--standalone \
--embed-resources \
--template template.html \
-o "$@"
$(BUILD_DIR)/index.html: make_index.md.sh
bash $< | pandoc \
--standalone \
--embed-resources \
--template template.html \
-o "$@"
make_dirs:
mkdir -p $(BUILD_DIR)/stories
all: make_dirs $(HTMLTARGETS) $(BUILD_DIR)/index.html
clean:
rm -rf $(BUILD_DIR)
.PHONY: clean make_dirs all up
|