docs: Fix Sphinx configuration for msys2/mingw
authorYonggang Luo <luoyonggang@gmail.com>
Thu, 15 Oct 2020 22:06:23 +0000 (06:06 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 17 Oct 2020 14:45:52 +0000 (10:45 -0400)
Python doesn't support running ../scripts/kernel-doc directly.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Message-Id: <20201015220626.418-2-luoyonggang@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
docs/conf.py
docs/sphinx/kerneldoc.py

index 00e1b750e240692ae1fd82cfc49f3a75cc94249b..e584f68393898c7edb8e2cb137ef5b519e030321 100644 (file)
@@ -241,7 +241,7 @@ texinfo_documents = [
 # We use paths starting from qemu_docdir here so that you can run
 # sphinx-build from anywhere and the kerneldoc extension can still
 # find everything.
-kerneldoc_bin = os.path.join(qemu_docdir, '../scripts/kernel-doc')
+kerneldoc_bin = ['perl', os.path.join(qemu_docdir, '../scripts/kernel-doc')]
 kerneldoc_srctree = os.path.join(qemu_docdir, '..')
 hxtool_srctree = os.path.join(qemu_docdir, '..')
 qapidoc_srctree = os.path.join(qemu_docdir, '..')
index 3e879402064603ee6a2f95263ef07d4c12461a21..3ac277d1622464cc4a4bd6a274839692342e3873 100644 (file)
@@ -67,7 +67,7 @@ class KernelDocDirective(Directive):
 
     def run(self):
         env = self.state.document.settings.env
-        cmd = [env.config.kerneldoc_bin, '-rst', '-enable-lineno']
+        cmd = env.config.kerneldoc_bin + ['-rst', '-enable-lineno']
 
         filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
         export_file_patterns = []