-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
53 lines (38 loc) · 1.44 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#### Generated image files ####
DOT_GEN_FILES = $(patsubst %.dot, %.png, $(wildcard dot/*.dot))
SVG_GEN_FILES = $(patsubst %.svg, %.png, $(wildcard svg/*.svg))
MSC_GEN_FILES = $(patsubst %.msc, %.png, $(wildcard msc/*.msc))
ALL_GEN_FILES = ${DOT_GEN_FILES} ${SVG_GEN_FILES} ${MSC_GEN_FILES}
#### Primary targets ####
TARGETS = ssp21.html ssp21.pdf
default: $(TARGETS)
clean:
rm -f $(TARGETS) $(ALL_GEN_FILES)
wrap:
fold -w 120 -s ssp21.md > ssp21_folded.md
mv ssp21_folded.md ssp21.md
#### Use pandoc to create PDF and HTML ####
ssp21.html: ssp21.md template_pandoc.html spec_markdown.css Makefile $(ALL_GEN_FILES)
pandoc ssp21.md -s --toc --toc-depth=5 --number-sections \
--metadata date="`./get_date_and_revision.sh`" \
-f markdown+yaml_metadata_block+startnum \
--filter pandoc-fignos \
--template template_pandoc.html \
--css=spec_markdown.css \
-o ssp21.html
ssp21.pdf: ssp21.md template_pandoc.latex Makefile $(ALL_GEN_FILES)
pandoc ssp21.md -s --toc --toc-depth=5 --number-sections \
--metadata date="`./get_date_and_revision.sh`" \
-f markdown+yaml_metadata_block+startnum \
--filter pandoc-fignos \
--template template_pandoc.latex \
-V colorlinks \
--highlight-style=monochrome \
-o ssp21.pdf
#### Wildcard rules for generating PNGs from source formats ####
dot/%.png: dot/%.dot Makefile
dot -Tpng -o $@ $<
msc/%.png: msc/%.msc Makefile
mscgen -T png -i $< -o $@
svg/%.png: svg/%.svg Makefile
inkscape -z -e $@ $<