public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Enze Li <lienze2010@hotmail.com>
To: Simon Marchi <simon.marchi@polymtl.ca>,
	gdb-patches@sourceware.org,
	Joel Brobecker <brobecker@adacore.com>
Subject: Re: [PATCH] gdb: AC_INIT should be called with package and version arguments
Date: Tue, 23 Nov 2021 21:22:17 +0800	[thread overview]
Message-ID: <MEAP282MB0293C3D60A446E7B32BDE790DD609@MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <6b270217-7410-9ae2-cfeb-a05c158704c2@polymtl.ca>

Hi Simon,

On Sun, 2021-11-14 at 21:52 -0500, Simon Marchi wrote:
> On 2021-11-13 23:09, Enze Li via Gdb-patches wrote:
> > This patch adds package and version parameters to AC_INIT and
> > regenerates the configure script.
> 
> Just wondering, is there practical reason to change this other than to
> "do things right"?  I'm not against it, I would just like to know the
> motivation behind it.
> 

When I made this patch, I wasn't thinking too much about it. I just ran
into this little snag when I was using the configure script to get the
version number. 

As far as I know, standard GNU software provides this feature, and the
package name and version information is defined in the header file,
which can be used directly in the project.

As you can see, when executing the "./configure --version", we can see
the following message.

-----------------------------------------------------------------------
configure
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
-----------------------------------------------------------------------

But what we expect is something like this.

-----------------------------------------------------------------------
gdb configure 12.0.50
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
-----------------------------------------------------------------------

In fact, this is not a serious problem, but I think we should fix it
and make it consistent with other GNU software.

> > diff --git a/gdb/version.m4 b/gdb/version.m4
> > new file mode 100644
> > index 00000000000..2fa57f680ef
> > --- /dev/null
> > +++ b/gdb/version.m4
> > @@ -0,0 +1 @@
> > +m4_define([GDB_VERSION], [12.0.50])
> > 
> 
> We already have the version number in gdb/version.in.  I don't know
> if
> we want to hardcode it at two places.  At least, this should be
> coordinated with Joel, responsible for the release process including
> bumping the version number.
> 
> Simon
> 

I really didn't think about the release process thing. Thanks for the
heads up. I'll fix this in the next patch.

Thanks,
Enze


      parent reply	other threads:[~2021-11-23 13:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-14  4:09 Enze Li
2021-11-15  2:52 ` Simon Marchi
2021-11-21 13:03   ` Joel Brobecker
2021-11-23 13:40     ` Enze Li
2021-11-24  7:44       ` Joel Brobecker
2021-11-23 13:22   ` Enze Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MEAP282MB0293C3D60A446E7B32BDE790DD609@MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM \
    --to=lienze2010@hotmail.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).