-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
38 lines (25 loc) · 773 Bytes
/
Copy pathmakefile
File metadata and controls
38 lines (25 loc) · 773 Bytes
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
29
30
31
32
33
34
35
36
37
38
parser=./parse_recipe.py
typer=./set_recipe.py
html_files:=$(shell find -L html -type f)
json_targets:=$(html_files:html/%=json/%)
md_targets:=$(html_files:html/%=md/%.md)
pdf_targets:=$(html_files:html/%=pdf/%.pdf)
json/%: html/%
$(parser) $< -o $@
md/%.md: json/%
$(typer) $< -o $@
pdf/%.pdf: md/%.md
pandoc --pdf-engine=xelatex $< -o $@
data/metadata.csv: $(json_targets)
./metadata.py json -o $@
data/ingredients.csv: $(json_targets)
./metadata.py json -i $@
data/comments.csv: $(json_targets)
./metadata.py json -m $@
data/categories.csv: $(json_targets)
./metadata.py json -c $@
.PHONY: json pdf md
json: $(json_targets)
md: $(md_targets)
pdf: $(pdf_targets)
all: json data/metadata.csv data/ingredients.csv data/comments.csv data/categories.csv