Some addition comments on the implementation: - Also needs to be hacked up for svg conversion. - Inline kernel-render creates temp files and caches them, doesn't seem that good an idea. Probably should switch over to using pipes. - Reimplements sphinx' depency tracking. Might be fixable if we just use pipes (and using the sphinx functions to open/read files). - Linenumbers are off, but no idea how to fix that. - Script looks a bit complicated to me, but I don't have python clue. Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> --- Documentation/sphinx/kfigure.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/sphinx/kfigure.py b/Documentation/sphinx/kfigure.py index 76425b461a40..d6819337edf6 100644 --- a/Documentation/sphinx/kfigure.py +++ b/Documentation/sphinx/kfigure.py @@ -50,6 +50,7 @@ import os from os import path import subprocess from hashlib import sha1 +import sys from docutils import nodes from docutils.statemachine import ViewList @@ -278,11 +279,16 @@ def dot2format(dot_fname, out_fname): """ out_format = path.splitext(out_fname)[1][1:] - cmd = [dot_cmd, '-T%s' % out_format, dot_fname] + cmd = [dot_cmd, '-T%s' % out_format, dot_fname, '-v'] exit_code = 42 with open(out_fname, "w") as out: - exit_code = subprocess.call( + p = subprocess.Popen( cmd, stdout = out, stderr = subprocess.PIPE ) + meh, err = p.communicate() + + sys.stderr.write(err) + + exit_code = p.returncode out.flush() return bool(exit_code == 0) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html