summary refs log tree commit diff stats
path: root/docs/sphinx/dbusdomain.py
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@suse.de>2023-05-03 17:39:46 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2023-05-18 08:53:50 +0200
commited8d95182bc994e31e730c59e1c8bfec4822b27d (patch)
tree991a86339dbc83df9ecd913b9559b1f6238cb7e9 /docs/sphinx/dbusdomain.py
parent8bf171c2d126aea6b60b818f1cee7e0e9eef0390 (diff)
downloadfocaccia-qemu-ed8d95182bc994e31e730c59e1c8bfec4822b27d.tar.gz
focaccia-qemu-ed8d95182bc994e31e730c59e1c8bfec4822b27d.zip
meson: Pass -j option to sphinx
Save a bit of build time by passing the number of jobs option to
sphinx.

We cannot use  the -j option from make because  meson does not support
setting build time parameters for custom targets. Use nproc instead or
the equivalent sphinx option "-j  auto", if that is available (version
>=1.7.0).

Also make sure our plugins support parallelism and report it properly
to sphinx. Particularly, implement the merge_domaindata method in
DBusDomain that is used to merge in data from other subprocesses.

Tested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Message-Id: <20230503203947.3417-2-farosas@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/sphinx/dbusdomain.py')
-rw-r--r--docs/sphinx/dbusdomain.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/sphinx/dbusdomain.py b/docs/sphinx/dbusdomain.py
index 2ea95af623..9872fd5bf6 100644
--- a/docs/sphinx/dbusdomain.py
+++ b/docs/sphinx/dbusdomain.py
@@ -400,6 +400,10 @@ class DBusDomain(Domain):
         for refname, obj in self.objects.items():
             yield (refname, refname, obj.objtype, obj.docname, obj.node_id, 1)
 
+    def merge_domaindata(self, docnames, otherdata):
+        for name, obj in otherdata['objects'].items():
+            if obj.docname in docnames:
+                self.data['objects'][name] = obj
 
 def setup(app):
     app.add_domain(DBusDomain)