7 # kramdown: http://kramdown.rubyforge.org/
8 # $ sudo gem install kramdown
12 # graphviz: http://www.graphviz.org/
13 # http://www.graphviz.org/Download_macos.php
14 # or $ sudo port install graphviz +no_x11
15 # pdflatex: https://www.tug.org/texlive/
16 # follow https://code.google.com/p/mactlmgr/
27 $(BUILD_DST
)/%.png
: %.dot
29 $(BUILD_DST
)/%.pdf
: %.dot
31 $(BUILD_DST
)/%.svg
: %.dot
33 $(BUILD_DST
)/%.svg
: %.svg
37 $(BUILD_DST
)/%.html
: %.md
38 -$(KRAMDOWN
) --template templates
/document-mathjax
$< > $@
39 $(BUILD_DST
)/%.
tex: %.md
40 -$(KRAMDOWN
) --template templates
/document-toc
--output latex
$< > $@
42 # needs texlive package ucs
43 # call 2x to get toc right
44 -$(PDFLATEX
) -output-directory
=$(BUILD_DST
) $< ; $(PDFLATEX
) -output-directory
=$(BUILD_DST
) $<
48 SPECS_DOT
:= $(patsubst %.dot
,$(BUILD_DST
)/%.pdf
,$(wildcard **.dot
))
49 SPECS_HTML
:= $(patsubst %.md
,$(BUILD_DST
)/%.html
,$(wildcard **.md
))
50 SPECS_SVG
:= $(patsubst %.svg
,$(BUILD_DST
)/%.svg
,$(wildcard **.svg
))
51 SPECS_TEX
:= $(patsubst %.md
,$(BUILD_DST
)/%.pdf
,$(wildcard **.md
))
53 TARGETS
:= $(SPECS_HTML
) $(SPECS_DOT
) $(SPECS_SVG
)
57 pdf
: $(SPECS_TEX
) $(SPECS_DOT
)
60 -$(RM
) $(TARGETS
) $(SPECS_TEX
) *.aux
*.log
*.out
*.toc