From 54d2eff8b90eac9838fd0168dab2f454b0f8dbf2 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Fri, 7 Apr 2017 12:25:01 -0400 Subject: [PATCH] Add diagram generation with graphviz * configure.ac (TWOPI, HAS_TWOPI): Add variables. Check for towpi. * doc/.gitignore (diagrams/*.svg): Add output file ignore. * doc/Makefile.am: Add svg diagram building. --- configure.ac | 5 +++++ doc/.gitignore | 1 + doc/Makefile.am | 12 +++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0b30840..63ed044 100644 --- a/configure.ac +++ b/configure.ac @@ -34,6 +34,11 @@ AC_CHECK_PROGS(NODE, [node nodejs]) test -n "$NODE" || AC_MSG_ERROR([missing Node.js]) +# graphviz +AC_ARG_VAR([TWOPI], [Graphviz twopi layout]) +AC_CHECK_PROGS(TWOPI, [twopi]) +AM_CONDITIONAL(HAS_TWOPI, [test "$TWOPI"]) + # only needed for older versions of Node AC_MSG_CHECKING([node --harmony_destructuring]) AS_IF([node --harmony_destructuring >/dev/null 2>/dev/null], diff --git a/doc/.gitignore b/doc/.gitignore index 6eab057..9ffb45d 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -13,6 +13,7 @@ *.pdf *.dvi *.html +diagrams/*.svg # generated by configure/autotools Makefile diff --git a/doc/Makefile.am b/doc/Makefile.am index c38a564..be9c55e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -21,4 +21,14 @@ MAKEINFOHTML = $(MAKEINFO) --html --css-include liza.css info_TEXINFOS = liza.texi -liza_TEXINFOS = design.texi macros.texi config.texi liza.css +liza_TEXINFOS = design.texi macros.texi config.texi liza.css \ + diagram/event-graph.svg + +diagram/%.svg: diagram/%.dot +if HAS_TWOPI + $(TWOPI) -Tsvg "$<" > "$@" +else + @echo "cannot build $<;" >&2 + @echo "install graphviz package and re-configure" >&2 +endif +