buildtools/cmdline: fix meson error when used as a subproject

Message ID 20240801100153.41779-2-rjarry@redhat.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series buildtools/cmdline: fix meson error when used as a subproject |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Robin Jarry Aug. 1, 2024, 10:01 a.m. UTC
Fix the following error when using dpdk as a subproject:

 subprojects/dpdk/buildtools/subproject/meson.build:28:56:
 ERROR: Unknown function "file".

This was obviously never tested in its submitted form.

Cc: stable@dpdk.org
Fixes: 7d8c608faa7f ("buildtools/cmdline: allow using script in subproject")

Signed-off-by: Robin Jarry <rjarry@redhat.com>
---
 buildtools/subproject/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Bruce Richardson Aug. 7, 2024, 1:43 p.m. UTC | #1
On Thu, Aug 01, 2024 at 12:01:54PM +0200, Robin Jarry wrote:
> Fix the following error when using dpdk as a subproject:
> 
>  subprojects/dpdk/buildtools/subproject/meson.build:28:56:
>  ERROR: Unknown function "file".
> 
> This was obviously never tested in its submitted form.
> 
> Cc: stable@dpdk.org
> Fixes: 7d8c608faa7f ("buildtools/cmdline: allow using script in subproject")
> 
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
> ---

Good catch, and easy fix, thanks.

Interestingly, even without testing the build, vscode meson extension
flags this issue in the "problems" tab of vscode: "Unknown function `file`"

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

Patch

diff --git a/buildtools/subproject/meson.build b/buildtools/subproject/meson.build
index 9ba94671bd0e..8ae081e1698a 100644
--- a/buildtools/subproject/meson.build
+++ b/buildtools/subproject/meson.build
@@ -25,4 +25,4 @@  endif
 
 libdpdk_dep = dpdk_dep
 
-meson.override_find_program('dpdk-cmdline-gen.py', file('../dpdk-cmdline-gen.py'))
+meson.override_find_program('dpdk-cmdline-gen.py', files('../dpdk-cmdline-gen.py'))