diff mbox series

doc: fix build on Windows with meson 0.58

Message ID 20210630162235.267285-1-dmitry.kozliuk@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series doc: fix build on Windows with meson 0.58 | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot success github build: passed
ci/checkpatch success coding style OK

Commit Message

Dmitry Kozlyuk June 30, 2021, 4:22 p.m. UTC
The `doc` target used `echo` as its command.
On Windows, `echo` is always a shell built-in, there is no binary.
Starting from meson 0.58, `run_target()` always searches for command
executable and no longer accepts `echo` as such on Windows.
Replace plain `echo` with a Python one-liner.

Fixes: d02a2dab2dfb ("doc: support building HTML guides with meson")
Cc: Bruce Richardson <bruce.richardson@intel.com>
Cc: Luca Boccassi <bluca@debian.org>
Cc: stable@dpdk.org

Reported-by: Rob Scheepens <rob.scheepens@nutanix.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
Sorry for the noise, sent to stable@ instead of dev@ first.

 doc/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Luca Boccassi July 1, 2021, 8:34 a.m. UTC | #1
On Wed, 2021-06-30 at 19:22 +0300, Dmitry Kozlyuk wrote:
> The `doc` target used `echo` as its command.
> On Windows, `echo` is always a shell built-in, there is no binary.
> Starting from meson 0.58, `run_target()` always searches for command
> executable and no longer accepts `echo` as such on Windows.
> Replace plain `echo` with a Python one-liner.
> 
> Fixes: d02a2dab2dfb ("doc: support building HTML guides with meson")
> Cc: Bruce Richardson <bruce.richardson@intel.com>
> Cc: Luca Boccassi <bluca@debian.org>
> Cc: stable@dpdk.org
> 
> Reported-by: Rob Scheepens <rob.scheepens@nutanix.com>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---
> Sorry for the noise, sent to stable@ instead of dev@ first.
> 
>  doc/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/meson.build b/doc/meson.build
> index 959606b965..abd7d70421 100644
> --- a/doc/meson.build
> +++ b/doc/meson.build
> @@ -11,5 +11,6 @@ if doc_targets.length() == 0
>  else
>      message = 'Building docs:'
>  endif
> -run_target('doc', command: ['echo', message, doc_target_names],
> +echo = [py3, '-c', 'import sys; print(*sys.argv[1:])']
> +run_target('doc', command: [echo, message, doc_target_names],
>      depends: doc_targets)

Acked-by: Luca Boccassi <bluca@debian.org>
Bruce Richardson July 1, 2021, 9:57 a.m. UTC | #2
On Thu, Jul 01, 2021 at 09:34:04AM +0100, Luca Boccassi wrote:
> On Wed, 2021-06-30 at 19:22 +0300, Dmitry Kozlyuk wrote:
> > The `doc` target used `echo` as its command.
> > On Windows, `echo` is always a shell built-in, there is no binary.
> > Starting from meson 0.58, `run_target()` always searches for command
> > executable and no longer accepts `echo` as such on Windows.
> > Replace plain `echo` with a Python one-liner.
> > 
> > Fixes: d02a2dab2dfb ("doc: support building HTML guides with meson")
> > Cc: Bruce Richardson <bruce.richardson@intel.com>
> > Cc: Luca Boccassi <bluca@debian.org>
> > Cc: stable@dpdk.org
> > 
> > Reported-by: Rob Scheepens <rob.scheepens@nutanix.com>
> > Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > ---
> 
> Acked-by: Luca Boccassi <bluca@debian.org>

One small suggestion might be to move the "echo" command definition to
buildtools folder in case it's wanted for use anywhere in the build at some
point in the future. However, this patch is fine without that change too.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon July 9, 2021, 12:49 p.m. UTC | #3
01/07/2021 11:57, Bruce Richardson:
> On Thu, Jul 01, 2021 at 09:34:04AM +0100, Luca Boccassi wrote:
> > On Wed, 2021-06-30 at 19:22 +0300, Dmitry Kozlyuk wrote:
> > > The `doc` target used `echo` as its command.
> > > On Windows, `echo` is always a shell built-in, there is no binary.
> > > Starting from meson 0.58, `run_target()` always searches for command
> > > executable and no longer accepts `echo` as such on Windows.
> > > Replace plain `echo` with a Python one-liner.
> > > 
> > > Fixes: d02a2dab2dfb ("doc: support building HTML guides with meson")
> > > Cc: Bruce Richardson <bruce.richardson@intel.com>
> > > Cc: Luca Boccassi <bluca@debian.org>
> > > Cc: stable@dpdk.org
> > > 
> > > Reported-by: Rob Scheepens <rob.scheepens@nutanix.com>
> > > Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > > ---
> > 
> > Acked-by: Luca Boccassi <bluca@debian.org>
> 
> One small suggestion might be to move the "echo" command definition to
> buildtools folder in case it's wanted for use anywhere in the build at some
> point in the future. However, this patch is fine without that change too.

I did the move in buildtools/meson.build:
echo = py3 + ['-c', 'import sys; print(*sys.argv[1:])']

> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Thomas Monjalon <thomas@monjalon.net>

Applied, thanks
diff mbox series

Patch

diff --git a/doc/meson.build b/doc/meson.build
index 959606b965..abd7d70421 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -11,5 +11,6 @@  if doc_targets.length() == 0
 else
     message = 'Building docs:'
 endif
-run_target('doc', command: ['echo', message, doc_target_names],
+echo = [py3, '-c', 'import sys; print(*sys.argv[1:])']
+run_target('doc', command: [echo, message, doc_target_names],
     depends: doc_targets)