[PATCH v4 1/4] docs: Fixes build docs on msys2/mingw

Yonggang Luo posted 4 patches 5 years, 3 months ago
Maintainers: Michael Roth <mdroth@linux.vnet.ibm.com>, Peter Maydell <peter.maydell@linaro.org>, Ed Maste <emaste@freebsd.org>, Li-Wen Hsu <lwhsu@freebsd.org>, Markus Armbruster <armbru@redhat.com>
There is a newer version of this series
[PATCH v4 1/4] docs: Fixes build docs on msys2/mingw
Posted by Yonggang Luo 5 years, 3 months ago
meson didn't support running ../scripts/kernel-do directly

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 docs/conf.py             | 2 +-
 docs/sphinx/kerneldoc.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index 00e1b750e2..e584f68393 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -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, '..')
diff --git a/docs/sphinx/kerneldoc.py b/docs/sphinx/kerneldoc.py
index 3e87940206..3ac277d162 100644
--- a/docs/sphinx/kerneldoc.py
+++ b/docs/sphinx/kerneldoc.py
@@ -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 = []
-- 
2.28.0.windows.1


Re: [PATCH v4 1/4] docs: Fixes build docs on msys2/mingw
Posted by Paolo Bonzini 5 years, 3 months ago
Il ven 16 ott 2020, 00:06 Yonggang Luo <luoyonggang@gmail.com> ha scritto:

> meson didn't support running ../scripts/kernel-do directly
>

Can you explain why this matters? Meson does not look at docs/conf.py.

Paolo


> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  docs/conf.py             | 2 +-
>  docs/sphinx/kerneldoc.py | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/docs/conf.py b/docs/conf.py
> index 00e1b750e2..e584f68393 100644
> --- a/docs/conf.py
> +++ b/docs/conf.py
> @@ -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, '..')
> diff --git a/docs/sphinx/kerneldoc.py b/docs/sphinx/kerneldoc.py
> index 3e87940206..3ac277d162 100644
> --- a/docs/sphinx/kerneldoc.py
> +++ b/docs/sphinx/kerneldoc.py
> @@ -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 = []
> --
> 2.28.0.windows.1
>
>
Re: [PATCH v4 1/4] docs: Fixes build docs on msys2/mingw
Posted by 罗勇刚 (Yonggang Luo) 5 years, 3 months ago
On Fri, Oct 16, 2020 at 6:19 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
>
> Il ven 16 ott 2020, 00:06 Yonggang Luo <luoyonggang@gmail.com> ha scritto:
>>
>> meson didn't support running ../scripts/kernel-do directly
>
>
> Can you explain why this matters? Meson does not look at docs/conf.py.
>
> Paolo
>
>>
>> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
>> ---
>>  docs/conf.py             | 2 +-
>>  docs/sphinx/kerneldoc.py | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/docs/conf.py b/docs/conf.py
>> index 00e1b750e2..e584f68393 100644
>> --- a/docs/conf.py
>> +++ b/docs/conf.py
>> @@ -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, '..')
>> diff --git a/docs/sphinx/kerneldoc.py b/docs/sphinx/kerneldoc.py
>> index 3e87940206..3ac277d162 100644
>> --- a/docs/sphinx/kerneldoc.py
>> +++ b/docs/sphinx/kerneldoc.py
>> @@ -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']
  meson use the conf directly
>>
>>          filename = env.config.kerneldoc_srctree + '/' +
self.arguments[0]

>>          export_file_patterns = []
>> --
>> 2.28.0.windows.1
>>


--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo