From 93687d6c73e0f0d367bdbfe9989d4368e8e699bd Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 23 Aug 2017 17:48:42 +0200 Subject: Generate SVG graphs. --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3dad6aa..7ac3afc 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,10 @@ markdown-snippets := topbar.mdwn footer.mdwn hypertext-snippets = $(markdown-snippets:%.mdwn=%.html) markdown := $(filter-out $(markdown-snippets),$(wildcard *.mdwn */*.mdwn */*/*.mdwn)) hypertext = $(subst index/index,index,$(markdown:%.mdwn=%/index.html)) +graph := $(wildcard *.dot */*.dot */*/*.dot) +vectorimage-graph := $(graph:%.dot=%.svg) -all: $(hypertext) style.css +all: $(hypertext) $(vectorimage-graph) style.css update: .git git pull @@ -13,6 +15,9 @@ $(hypertext-snippets): %.html: %.mdwn Makefile pandoc -f markdown -t html -o $@ $< sed -i -e '1i
' -e '$$ a
' $@ +$(vectorimage-graph): %.svg: %.dot Makefile + dot -Tsvg -o$@ $< + %.html %/index.html: %.mdwn $(hypertext-snippets) Makefile $(if $(filter-out ./,$(dir $@)),mkdir -p $(dir $@)) pandoc -s -c /style.css -B topbar.html -A footer.html -f markdown -t html -o $@ $< @@ -21,6 +26,7 @@ $(hypertext-snippets): %.html: %.mdwn Makefile scss --compass --style compressed $< $@ clean: + rm -f $(vectorimage-graph) find -type f -name '*.html' -delete find -type d -empty -delete rm -f style.css style.css.map -- cgit v1.2.3