[dpdk-dev] [PATCH] build: use cat instead of more
Ali Alnubani
alialnu at mellanox.com
Mon Apr 1 12:36:34 CEST 2019
This is to fix a build error with meson that is caused
by using the 'more' command to read the VERSION file. The error:
config/meson.build:10:10: ERROR: String
'::::::::::::::\n<RTE_SDK_PATH>VERSION\n::::::::::::::\n19' cannot be
converted to int
The command 'more' prints the file name before the actual
contents of the file when it's being run without a controlling terminal.
This could happen in CI environments.
Please refer to:
https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/text-utils/more.c
The cat command can still be found on Windows if the ports of GNU
utilities are installed.
Fixes: c04172b5f031 ("build: add single source of DPDK version number")
Fixes: d320fe56bd51 ("build: use version number from config file")
Signed-off-by: Ali Alnubani <alialnu at mellanox.com>
---
meson.build | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index fa6bf3d07..55aa7c46d 100644
--- a/meson.build
+++ b/meson.build
@@ -3,8 +3,7 @@
project('DPDK', 'C',
# Get version number from file.
- # Use "more" rather than "cat" for windows compatibility.
- version: run_command('more', files('VERSION')).stdout().strip(),
+ version: run_command('cat', files('VERSION')).stdout().strip(),
license: 'BSD',
default_options: ['buildtype=release', 'default_library=static'],
meson_version: '>= 0.47.1'
--
2.19.2
More information about the dev
mailing list