-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.pd
More file actions
37 lines (25 loc) · 863 Bytes
/
Copy pathMakefile.pd
File metadata and controls
37 lines (25 loc) · 863 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
#PD_OPTS=--toc --number-sections --normalize --smart -V geometry="margin=1in" -f markdown --standalone
PD_OPTS=--toc --number-sections --standalone --smart --normalize -V geometry="margin=1in"
# IMAGES=$(IMGMSC:.msc=.png) $(IMGDOT:.dot=.png)
IMAGES=$(shell tools/mdimages.php -i $(CACHE) -l -g)
CACHE=.makedoc.cache
OUT_MD=$(OUT).md
OUT_PDF=$(OUT).pdf
.PHONY: all clean builddoc images
all: $(OUT_MD) $(OUT_PDF)
clean:
rm -rf $(OUT_PDF) $(OUT_MD) $(IMAGES)
builddoc: $(CACHE)
$(CACHE): spec/*.md
tools/build.sh > $(CACHE)
images: $(IMAGES)
$(OUT_MD): builddoc images
tools/mdimages.php -i $(CACHE) -r -o $(OUT_MD)
$(OUT_PDF): $(OUT_MD)
pandoc $(PD_OPTS) $(OUT_MD) -o $(OUT_PDF)
%.png: %.msc
mscgen -T png -o $@ -i $<
convert $@ -density 75 -units PixelsPerInch $@
%.png: %.dot
dot -Tpng -o$@ $<
convert $@ -density 175 -units PixelsPerInch $@