build: get version number from header file
PATCH 1/1 build: get version number from header file
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.
---
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(-)
meson.build +1 -1
@@ -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'
Signature · 1 line
2.18.0
Quoted 26 lines · Thomas Monjalon
The header file
rte_version.hshould 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 <[email protected]>---
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(-)meson.build +0
-0@@ -2,7 +2,7 @@ # Copyright(c) 2017 Intel Corporation
project('DPDK', 'C',meson.build +1
-1- version: '18.11-rc0', + version: run_command('make',
Quoted 5 lines
'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?
Signature · 2 lines
Kind regards, Luca Boccassi
Quoted 27 lines · Luca Boccassi
Quoted 26 lines · Thomas Monjalon
The header file
rte_version.hshould 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 <[email protected]>---
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(-)meson.build +0
-0@@ -2,7 +2,7 @@ # Copyright(c) 2017 Intel Corporation
project('DPDK', 'C',meson.build +1
-1- version: '18.11-rc0', + version: run_command('make',
Quoted 10 lines
Quoted 5 lines
'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?
I would tend to agree. I also think that the rte_version.h file is the wrong place to put the version info, it would be better specified somewhere at the root of the tree. Therefore, I think that the toplevel makefile and meson.build files should have the version number there and then auto-generate the rte_version.h file based on that information.
/Bruce
31/08/2018 16:24, Bruce Richardson:
Quoted 38 lines · Luca Boccassi
Quoted 24 lines · Thomas Monjalon
Quoted 23 lines
The header file
rte_version.hshould 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 <[email protected]>---
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(-)meson.build +0
-0@@ -2,7 +2,7 @@ # Copyright(c) 2017 Intel CorporationQuoted 12 lines
Quoted 8 lines
meson.build +1
-1project('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?
Quoted 5 lines
I would tend to agree. I also think that the
rte_version.hfile is the wrong place to put the version info, it would be better specified somewhere at the root of the tree. Therefore, I think that the toplevel makefile and meson.build files should have the version number there and then auto-generate therte_version.hfile based on that information.
Yes
There are only 2 requirements:
- have the version number in a single place
- keep the C macros (generated or not)
Any solution satisfying those two requirements will be welcome.