[dpdk-dev] [PATCH] build: get version number from header file

Luca Boccassi bluca at debian.org
Fri Aug 31 16:10:42 CEST 2018


On Fri, 2018-08-31 at 15:51 +0200, Thomas Monjalon wrote:
> The header file rte_version.h should be the unique place
> to define the version number.
> The makefile command "showversion" makes it accessible,
> and it is used to set the meson project version with an external
> command.
> 
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> ---
> 
> I don't know how to check easily the meson version number.
> Please help in testing, thanks.
> 
> ---
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 84af32ece..b9d1030e7 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2,7 +2,7 @@
>  # Copyright(c) 2017 Intel Corporation
>  
>  project('DPDK', 'C',
> -	version: '18.11-rc0',
> +	version: run_command('make',
> 'showversion').stdout().strip(),
>  	license: 'BSD',
>  	default_options: ['buildtype=release',
> 'default_library=static'],
>  	meson_version: '>= 0.41'

Isn't the ultimate end goal to remove the makefiles? If so, shouldn't
meson be independent?

-- 
Kind regards,
Luca Boccassi


More information about the dev mailing list