Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [pushed 1/2] [gdb/doc] Fix makeinfo-wrapper.sh for non-GNU sed
@ 2026-11-04  9:14 Tom de Vries
  2026-11-04  9:14 ` [pushed 2/2] [gdb/doc] Improve error handling in makeinfo-wrapper.sh Tom de Vries
  2026-11-04  9:35 ` [pushed 1/2] [gdb/doc] Fix makeinfo-wrapper.sh for non-GNU sed Andreas Schwab
  0 siblings, 2 replies; 3+ messages in thread
From: Tom de Vries @ 2026-11-04  9:14 UTC (permalink / raw)
  To: gdb-patches

PR build/34943 reports a failure when building on macos:
...
gdb/doc/makeinfo-wrapper.sh 5 0 makeinfo --split-size=5000000 \
  -DHAVE_MAKEINFO_CLICK -I gdb/doc -o annotate.info gdb/doc/annotate.texinfo
gdb/doc/makeinfo-wrapper.sh: line 37: [: texi2any (GNU texinfo) 7.3: \
  integer expression expected
gdb/doc/makeinfo-wrapper.sh: line 38: [: texi2any (GNU texinfo) 7.3: \
  integer expression expected
gdb/doc/makeinfo-wrapper.sh: line 37: [: texi2any (GNU texinfo) 7.3: \
  integer expression expected
gdb/doc/makeinfo-wrapper.sh: line 38: [: texi2any (GNU texinfo) 7.3: \
  integer expression expected
...

The problem is that makeinfo-wrapper.sh uses some non-POSIX sed support.  I
can reproduce the problem on x86_64-linux using "sed --posix".

Fix this by dropping the '\?' part.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34943
---
 gdb/doc/makeinfo-wrapper.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/doc/makeinfo-wrapper.sh b/gdb/doc/makeinfo-wrapper.sh
index 7ad63bca3bc..b6abbc4e6ea 100755
--- a/gdb/doc/makeinfo-wrapper.sh
+++ b/gdb/doc/makeinfo-wrapper.sh
@@ -24,10 +24,10 @@ shift 3
 
 major=$("$prog" --version \
 	    | grep "GNU texinfo" \
-	    | sed 's/^.* \([0-9][0-9]*\)\.[0-9][0-9]*\(.*\)\?$/\1/')
+	    | sed 's/^.* \([0-9][0-9]*\)\.[0-9][0-9]*.*$/\1/')
 minor=$("$prog" --version \
 	    | grep "GNU texinfo" \
-	    | sed 's/^.* [0-9][0-9]*\.\([0-9][0-9]*\)\(.*\)\?$/\1/')
+	    | sed 's/^.* [0-9][0-9]*\.\([0-9][0-9]*\).*$/\1/')
 
 if [ "$major" = "" ] || [ "$major" = "" ]; then
     echo "Cannot determine makeinfo version for $prog.  Info documentation will not be build."

base-commit: 3d186a654a2f4f51c765eb54d2ceffbf09a9d9ee
-- 
2.51.0


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

end of thread, other threads:[~2026-11-04  9:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04  9:14 [pushed 1/2] [gdb/doc] Fix makeinfo-wrapper.sh for non-GNU sed Tom de Vries
2026-11-04  9:14 ` [pushed 2/2] [gdb/doc] Improve error handling in makeinfo-wrapper.sh Tom de Vries
2026-11-04  9:35 ` [pushed 1/2] [gdb/doc] Fix makeinfo-wrapper.sh for non-GNU sed Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox