-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (44 loc) · 1.36 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
53
54
55
56
57
58
59
60
.PHONY: clea
.SUFFIXES: .md .html .tex
HTML_TEMPLATE=template/html5.html
.md.html:
@TITLE=`perl -e "print substr(ucfirst('$<'),0,-3)"`; \
pandoc $< -t html5 --template $(HTML_TEMPLATE) -V lang=en \
-c template/bootstrap.min.css \
-V title=$$TITLE -V pagetitle=$$TITLE -V author-meta="Jakob Voss" \
--include-before-body=groups.html \
| perl -pe 's{href="">([^<]+)<}{"href=\"".lc($$1).".html\">$$1<"}ge' \
> $@
@echo $@
html: groups.html $(shell ls *.md | sed s/\.md/.html/)
tex: groups.yaml *.md patterngraph.tex
@perl bin/groups2tex.pl
normalize: *.md
@perl bin/normalize.pl *.md
clean:
@rm -f *.html *.tex patterngraph.* links.csv groups.markdown
groups.markdown: groups.yaml
@perl bin/groups2md.pl > $@
@echo $@
groups.html: groups.markdown
@pandoc $< -t html \
| sed 's/<ul/<ul class="nav nav-list"/' > $@
@echo $@
new: clean html links tex
links: links.csv
links.csv: *.md
@perl bin/extractlinks.pl > $@
@echo $@
patterngraph: patterngraph.png patterngraph.dot patterngraph.svg
patterngraph.png: links.csv
@perl bin/patterngraph.pl $@
@echo $@
patterngraph.svg: links.csv
@perl bin/patterngraph.pl $@
@echo $@
patterngraph.dot: links.csv
@perl bin/patterngraph.pl $@
@echo $@
patterngraph.tex: patterngraph.dot
@dot2tex --figonly $< | perl -pe 's/node {([^}]+)}/node {\\pattern{$$1}}/' > $@
@echo "$@ needs manual adjustement of scale."