public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb: AC_INIT should be called with package and version arguments
@ 2021-11-14  4:09 Enze Li
  2021-11-15  2:52 ` Simon Marchi
  0 siblings, 1 reply; 6+ messages in thread
From: Enze Li @ 2021-11-14  4:09 UTC (permalink / raw)
  To: gdb-patches

This patch adds package and version parameters to AC_INIT and
regenerates the configure script.

gdb/
	* version.m4: New file.
	* configure.ac: Include version.m4.
	(AC_INIT): Update.
	* configure: Regenerate.
---
 gdb/configure    | 32 +++++++++++++++++---------------
 gdb/configure.ac |  4 +++-
 gdb/version.m4   |  1 +
 3 files changed, 21 insertions(+), 16 deletions(-)
 create mode 100644 gdb/version.m4

diff --git a/gdb/configure b/gdb/configure
index 6e2dfb766c8..9490aabf25a 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.
+# Generated by GNU Autoconf 2.69 for gdb 12.0.50.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -575,12 +575,12 @@ MFLAGS=
 MAKEFLAGS=
 
 # Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME='gdb'
+PACKAGE_TARNAME='gdb'
+PACKAGE_VERSION='12.0.50'
+PACKAGE_STRING='gdb 12.0.50'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
 
 ac_unique_file="main.c"
 # Factoring default headers for most tests.
@@ -1000,7 +1000,7 @@ sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
 infodir='${datarootdir}/info'
 htmldir='${docdir}'
 dvidir='${docdir}'
@@ -1500,7 +1500,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures gdb 12.0.50 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1548,7 +1548,7 @@ Fine tuning of the installation directories:
   --infodir=DIR           info documentation [DATAROOTDIR/info]
   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/gdb]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1574,7 +1574,9 @@ _ACEOF
 fi
 
 if test -n "$ac_init_help"; then
-
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of gdb 12.0.50:";;
+   esac
   cat <<\_ACEOF
 
 Optional Features:
@@ -1784,7 +1786,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-configure
+gdb configure 12.0.50
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2640,7 +2642,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by $as_me, which was
+It was created by gdb $as_me 12.0.50, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -20433,7 +20435,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by $as_me, which was
+This file was extended by gdb $as_me 12.0.50, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20503,7 +20505,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-config.status
+gdb config.status 12.0.50
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/gdb/configure.ac b/gdb/configure.ac
index d4cfb6a7624..95c2349a810 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -18,7 +18,9 @@ dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT
+m4_include([version.m4])
+
+AC_INIT([gdb], GDB_VERSION)
 AC_CONFIG_MACRO_DIRS([../config])
 AC_CONFIG_SRCDIR([main.c])
 AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
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])
-- 
2.33.1


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

* Re: [PATCH] gdb: AC_INIT should be called with package and version arguments
  2021-11-14  4:09 [PATCH] gdb: AC_INIT should be called with package and version arguments Enze Li
@ 2021-11-15  2:52 ` Simon Marchi
  2021-11-21 13:03   ` Joel Brobecker
  2021-11-23 13:22   ` Enze Li
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Marchi @ 2021-11-15  2:52 UTC (permalink / raw)
  To: Enze Li, gdb-patches, Joel Brobecker

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.

> 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


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

* Re: [PATCH] gdb: AC_INIT should be called with package and version arguments
  2021-11-15  2:52 ` Simon Marchi
@ 2021-11-21 13:03   ` Joel Brobecker
  2021-11-23 13:40     ` Enze Li
  2021-11-23 13:22   ` Enze Li
  1 sibling, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2021-11-21 13:03 UTC (permalink / raw)
  To: Simon Marchi; +Cc: Enze Li, gdb-patches, Joel Brobecker

Hi Enze Li, hi Simon,

On Sun, Nov 14, 2021 at 09:52:00PM -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.
> 
> > 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.

Agreed. Can we have the configure script get the information from
gdb/version.in?

-- 
Joel

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

* Re: [PATCH] gdb: AC_INIT should be called with package and version arguments
  2021-11-15  2:52 ` Simon Marchi
  2021-11-21 13:03   ` Joel Brobecker
@ 2021-11-23 13:22   ` Enze Li
  1 sibling, 0 replies; 6+ messages in thread
From: Enze Li @ 2021-11-23 13:22 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches, Joel Brobecker

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


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

* Re: [PATCH] gdb: AC_INIT should be called with package and version arguments
  2021-11-21 13:03   ` Joel Brobecker
@ 2021-11-23 13:40     ` Enze Li
  2021-11-24  7:44       ` Joel Brobecker
  0 siblings, 1 reply; 6+ messages in thread
From: Enze Li @ 2021-11-23 13:40 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

Hi Joel,

Thanks for the review.

BTW, I'm not familiar with the release process.
Where can I find documentation on the release process?

Thanks in advance
Enze

On Sun, 2021-11-21 at 17:03 +0400, Joel Brobecker wrote:
> Hi Enze Li, hi Simon,
> 
> On Sun, Nov 14, 2021 at 09:52:00PM -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.
> > 
> > > 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.
> 
> Agreed. Can we have the configure script get the information from
> gdb/version.in?
> 


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

* Re: [PATCH] gdb: AC_INIT should be called with package and version arguments
  2021-11-23 13:40     ` Enze Li
@ 2021-11-24  7:44       ` Joel Brobecker
  0 siblings, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2021-11-24  7:44 UTC (permalink / raw)
  To: Enze Li; +Cc: Joel Brobecker, gdb-patches

> Thanks for the review.
> 
> BTW, I'm not familiar with the release process.
> Where can I find documentation on the release process?

There's a relatively old description of the process in our
"Internals" manual. https://sourceware.org/gdb/wiki/Internals

I use a set of scripts that automate most of the process.
In a nutshell, if you change gdb/version.in, I'll have to adapt
my scripts to follow.

-- 
Joel

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

end of thread, other threads:[~2021-11-24  7:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-14  4:09 [PATCH] gdb: AC_INIT should be called with package and version arguments 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 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).