Commit f8e233a3 authored by Iustin Pop's avatar Iustin Pop

Stop manually building images out of dot files

The first dot files we added way back in the 2.0 release are managed
manually: we build the .pngs ourselves, track them in .gitingore,
etc. Since then, we have switched to allow sphinx to build/manage them
itself, so it makes sense to cleanup the build system and covert
everything to this simpler method.

This patch simply converts from "image: x.png" to "graphviz: x.dot",
as an externally-referenced dot file, and removes all the custom
makefile rules for png conversion. The next patch will bring the
conversion further (by inlining then).

Additionally, while checking that the patch doesn't change the html
output, I saw that the use of "shape=diamond" with non-trivial labels
results in very ugly diagrams; so we split the question in such
decision boxes to make them more reasonably looking.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 7322bf7b
......@@ -62,7 +62,6 @@
/doc/upgrade.rst
/doc/hs-lint.html
/doc/*.in
/doc/*.png
# doc/examples
/doc/examples/bash_completion
......
......@@ -150,7 +150,6 @@ APIDOC_PY_DIR = $(APIDOC_DIR)/py
APIDOC_HS_DIR = $(APIDOC_DIR)/hs
MAINTAINERCLEANFILES = \
$(docpng) \
$(maninput) \
doc/install-quick.rst \
doc/news.rst \
......@@ -582,7 +581,7 @@ $(RUN_IN_TEMPDIR): | stamp-directories
# has to exist in order for the sphinx module to be loaded
# successfully, but we certainly don't want the docs to be rebuilt if
# it changes
doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
doc/html/index.html: $(docrst) $(docdot) doc/conf.py configure.ac \
$(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py \
lib/build/shell_example_lexer.py lib/opcodes.py lib/ht.py \
| $(BUILT_PYTHON_SOURCES)
......@@ -593,6 +592,7 @@ doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
-d . \
-D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
-D release="$(PACKAGE_VERSION)" \
-D graphviz_dot="$(DOT)" \
$(abs_top_srcdir)/doc $(CURDIR)/doc/html
rm -f doc/html/.buildinfo doc/html/objects.inv
touch $@
......@@ -616,8 +616,6 @@ docdot = \
doc/design-2.1-lock-acquire.dot \
doc/design-2.1-lock-release.dot
docpng = $(patsubst %.dot,%.png,$(docdot))
# Things to build but not to install (add it to EXTRA_DIST if it should be
# distributed)
noinst_DATA = \
......@@ -818,7 +816,6 @@ EXTRA_DIST = \
tools/kvm-ifup.in \
tools/vcluster-setup.in \
$(docdot) \
$(docpng) \
$(docrst) \
doc/conf.py \
doc/html \
......@@ -1192,10 +1189,6 @@ doc/examples/bash_completion doc/examples/bash_completion-debug: \
PYTHONPATH=. $(RUN_IN_TEMPDIR) \
$(CURDIR)/$(BUILD_BASH_COMPLETION) $(BC_ARGS) > $@
doc/%.png: doc/%.dot
@test -n "$(DOT)" || { echo 'dot' not found during configure; exit 1; }
$(DOT) -Tpng -o $@ $<
man/%.gen: man/%.rst lib/query.py lib/build/sphinx_ext.py \
lib/build/shell_example_lexer.py \
| $(RUN_IN_TEMPDIR) $(BUILT_PYTHON_SOURCES)
......
......@@ -102,7 +102,7 @@ these operations are scheduled internally will change radically.
The new design will change the cluster architecture to:
.. image:: arch-2.0.png
.. graphviz:: arch-2.0.dot
This differs from the 1.2 architecture by the addition of the master
daemon, which will be the only entity to talk to the node daemons.
......
......@@ -11,10 +11,10 @@ digraph "design-2.1-lock-acquire" {
remove_from_queue[label="Remove from queue"]
/* Conditions */
alone[label="Empty queue and can acquire?", shape=diamond]
have_timeout[label="Do I have timeout?", shape=diamond]
alone[label="Empty queue\nand can acquire?", shape=diamond]
have_timeout[label="Do I have\ntimeout?", shape=diamond]
top_of_queue_and_can_acquire[
label="On top of queue and can acquire lock?",
label="On top of queue and\ncan acquire lock?",
shape=diamond,
]
......
......@@ -10,7 +10,7 @@ digraph "design-2.1-lock-release" {
success[label="Success"]
/* Conditions */
have_pending[label="Any pending acquires?", shape=diamond]
have_pending[label="Any pending\nacquires?", shape=diamond]
was_active_queue[
label="Was active condition\nfor shared acquires?",
shape=diamond,
......
......@@ -229,7 +229,7 @@ Optimization: There's no need to touch the queue if there are no pending
acquires and no current holders. The caller can have the lock
immediately.
.. image:: design-2.1-lock-acquire.png
.. graphviz:: design-2.1-lock-acquire.dot
Release
......@@ -244,7 +244,7 @@ inactive condition will be made active. This ensures fairness with
exclusive locks by forcing consecutive shared acquires to wait in the
queue.
.. image:: design-2.1-lock-release.png
.. graphviz:: design-2.1-lock-release.dot
Delete
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment