From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 1/2] [gdb/doc] Fix makeinfo-wrapper.sh for non-GNU sed
Date: Wed, 4 Nov 2026 10:14:27 +0100 [thread overview]
Message-ID: <20261104091428.3709971-1-tdevries@suse.de> (raw)
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
next reply other threads:[~2026-11-04 9:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 9:14 Tom de Vries [this message]
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
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=20261104091428.3709971-1-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/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