[v2] libctf: update regexp to allow makeinfo to build document

Message ID OS3P286MB2152CCD151694D02E2A84D23F0C39@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM
State Committed
Headers
Series [v2] libctf: update regexp to allow makeinfo to build document |

Commit Message

Enze Li Jan. 14, 2023, 4:23 a.m. UTC
  While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
following warning,

 checking for makeinfo... makeinfo --split-size=5000000
 configure: WARNING:
 *** Makeinfo is too old. Info documentation will not be built.

then I checked the version of makeinfo, it said,
======
$ makeinfo --version
texi2any (GNU texinfo) 7.0.1

Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
======

After digging a little bit, it became quite obvious that a dot is
missing in regexp that makes it impossible to match versions higher than
7.0, and here's the solution:

-       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then

However, Eli pointed out that the solution above has another problem: it
will stop working when Texinfo 10.1 will be released.  Meanwhile, he
suggested to solve this problem permanently.  That is, we don't care
about the minor version for Texinfo > 6.9, we only care about the major
version.

In this way, problem solved permanently, thanks to Eli.

libctf/ChangeLog:

	* configure: Regenerated.
	* configure.ac: Update regexp to match versions higher than 7.0.
---
 libctf/configure    | 2 +-
 libctf/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


base-commit: dd19001ff621dbdaddadf71d3b4984ea016fd153
  

Comments

Nick Alcock Jan. 16, 2023, 1:51 p.m. UTC | #1
On 14 Jan 2023, Enze Li via Binutils verbalised:

> While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
> following warning,
>
>  checking for makeinfo... makeinfo --split-size=5000000
>  configure: WARNING:
>  *** Makeinfo is too old. Info documentation will not be built.
>
> then I checked the version of makeinfo, it said,
> ======
> $ makeinfo --version
> texi2any (GNU texinfo) 7.0.1
>
> Copyright (C) 2022 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> ======
>
> After digging a little bit, it became quite obvious that a dot is
> missing in regexp that makes it impossible to match versions higher than
> 7.0, and here's the solution:
>
> -       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
> +       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
>
> However, Eli pointed out that the solution above has another problem: it
> will stop working when Texinfo 10.1 will be released.  Meanwhile, he
> suggested to solve this problem permanently.  That is, we don't care
> about the minor version for Texinfo > 6.9, we only care about the major
> version.
>
> In this way, problem solved permanently, thanks to Eli.

Looks good to me: approved. (I can commit it if you like.)

This should probably also be backported to the 2.40 branch to keep the
latest released GNU tools building with the latest released GNU tools.
  
Enze Li Jan. 16, 2023, 3:19 p.m. UTC | #2
On Mon, Jan 16 2023 at 01:51:07 PM +0000, Nick Alcock wrote:

> On 14 Jan 2023, Enze Li via Binutils verbalised:
>
>> While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
>> following warning,
>>
>>  checking for makeinfo... makeinfo --split-size=5000000
>>  configure: WARNING:
>>  *** Makeinfo is too old. Info documentation will not be built.
>>
>> then I checked the version of makeinfo, it said,
>> ======
>> $ makeinfo --version
>> texi2any (GNU texinfo) 7.0.1
>>
>> Copyright (C) 2022 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
>> ======
>>
>> After digging a little bit, it became quite obvious that a dot is
>> missing in regexp that makes it impossible to match versions higher than
>> 7.0, and here's the solution:
>>
>> -       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
>> +       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
>>
>> However, Eli pointed out that the solution above has another problem: it
>> will stop working when Texinfo 10.1 will be released.  Meanwhile, he
>> suggested to solve this problem permanently.  That is, we don't care
>> about the minor version for Texinfo > 6.9, we only care about the major
>> version.
>>
>> In this way, problem solved permanently, thanks to Eli.
>
> Looks good to me: approved. (I can commit it if you like.)
>
> This should probably also be backported to the 2.40 branch to keep the
> latest released GNU tools building with the latest released GNU tools.

Hi Nick,

Thanks for your review.  I'm checking this in now, and backporting it to
the 2.40 branch as well.

Best Regards,
Enze
  

Patch

diff --git a/libctf/configure b/libctf/configure
index c22f7dffd2c..a0e40f49a80 100755
--- a/libctf/configure
+++ b/libctf/configure
@@ -14864,7 +14864,7 @@  esac
     # We require texinfo to be 6.3 or later, for a working synindex
     # and validatemenus: otherwise we fall back to /bin/true.
     if ${MAKEINFO} --version \
-       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
       build_info=yes
     else
         build_info=
diff --git a/libctf/configure.ac b/libctf/configure.ac
index 1d0cf4d0fa5..6a5eade1855 100644
--- a/libctf/configure.ac
+++ b/libctf/configure.ac
@@ -184,7 +184,7 @@  changequote(,)
     # We require texinfo to be 6.3 or later, for a working synindex
     # and validatemenus: otherwise we fall back to /bin/true.
     if ${MAKEINFO} --version \
-       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
       build_info=yes
     else
         build_info=