DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] build: get version number from header file
@ 2018-08-31 13:51 Thomas Monjalon
  2018-08-31 14:10 ` Luca Boccassi
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2018-08-31 13:51 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev

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@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'
-- 
2.18.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] build: get version number from header file
  2018-08-31 13:51 [dpdk-dev] [PATCH] build: get version number from header file Thomas Monjalon
@ 2018-08-31 14:10 ` Luca Boccassi
  2018-08-31 14:24   ` Bruce Richardson
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Boccassi @ 2018-08-31 14:10 UTC (permalink / raw)
  To: Thomas Monjalon, bruce.richardson; +Cc: dev

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@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] build: get version number from header file
  2018-08-31 14:10 ` Luca Boccassi
@ 2018-08-31 14:24   ` Bruce Richardson
  2018-08-31 16:26     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2018-08-31 14:24 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Thomas Monjalon, dev

On Fri, Aug 31, 2018 at 03:10:42PM +0100, Luca Boccassi wrote:
> 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@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?
> 
> -- 

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] build: get version number from header file
  2018-08-31 14:24   ` Bruce Richardson
@ 2018-08-31 16:26     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2018-08-31 16:26 UTC (permalink / raw)
  To: Bruce Richardson, Luca Boccassi; +Cc: dev

31/08/2018 16:24, Bruce Richardson:
> On Fri, Aug 31, 2018 at 03:10:42PM +0100, Luca Boccassi wrote:
> > 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@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?
> > 
> 
> 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.

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-31 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31 13:51 [dpdk-dev] [PATCH] build: get version number from header file Thomas Monjalon
2018-08-31 14:10 ` Luca Boccassi
2018-08-31 14:24   ` Bruce Richardson
2018-08-31 16:26     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).