Skip to contentSkip to conversation

doc: fix build on Windows with meson 0.58

PATCH Applied Dmitry Kozlyuk 4 participants 4 messages Jun 30, 2021 – Jul 9, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: fix build on Windows with meson 0.58

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 <[email protected]>
Cc Luca Boccassi <[email protected]>

---
Sorry for the noise, sent to stable@ instead of dev@ first.

 doc/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
doc/meson.build +2 -1
index 959606b965..abd7d70421 100644
@@ -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)
Signature · 1 line
2.29.3
Acked-by on v1 1/1
#1 lore raw
Quoted 24 lines · Dmitry Kozlyuk

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 <[email protected]>
Cc Luca Boccassi <[email protected]>

---
Sorry for the noise, sent to stable@ instead of dev@ first.

 doc/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
doc/meson.build +0 -0
index 959606b965..abd7d70421 100644

doc/meson.build if doc_targets.length() == 0 · line 16

Quoted 7 lines
doc/meson.build +2 -1
@@ -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)
Signature · 2 lines
Kind regards,
Luca Boccassi
#2 lore raw
Quoted 12 lines · Luca Boccassi
Quoted 11 lines · Dmitry Kozlyuk

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 <[email protected]>
Cc Luca Boccassi <[email protected]>
Quoted 5 lines
Quoted 3 lines

---

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 Applied
#3 lore raw

01/07/2021 11:57, Bruce Richardson:

Quoted 17 lines · Luca Boccassi
Quoted 16 lines · Dmitry Kozlyuk
Quoted 14 lines

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 <[email protected]>
Cc Luca Boccassi <[email protected]>

---

Quoted 5 lines
Quoted 1 line

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:])']

Quoted 1 line

Applied, thanks