[4/5] build: use version file support from meson

Message ID 20240920125737.1197969-5-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series Increase minimum meson version |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Sept. 20, 2024, 12:57 p.m. UTC
Rather than having to use run_command to shell out and read the VERSION
file for the DPDK version, we can use the support added directly to
meson in version 0.57.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 meson.build | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
  

Comments

Robin Jarry Oct. 15, 2024, 8:17 a.m. UTC | #1
Bruce Richardson, Sep 20, 2024 at 14:57:
> Rather than having to use run_command to shell out and read the VERSION
> file for the DPDK version, we can use the support added directly to
> meson in version 0.57.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---

Reviewed-by: Robin Jarry <rjarry@redhat.com>
  

Patch

diff --git a/meson.build b/meson.build
index 69888834b4..fe9040369a 100644
--- a/meson.build
+++ b/meson.build
@@ -2,10 +2,7 @@ 
 # Copyright(c) 2017-2019 Intel Corporation
 
 project('DPDK', 'c',
-        # Get version number from file.
-        # Fallback to "more" for Windows compatibility.
-        version: run_command(find_program('cat', 'more'),
-            files('VERSION'), check: true).stdout().strip(),
+        version: files('VERSION'),
         license: 'BSD',
         default_options: [
             'buildtype=release',