public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH][gdb/build] Add gdb/contrib/makeinfo-dummy.sh
@ 2022-09-01  9:51 Tom de Vries
  2022-09-01 14:43 ` Simon Marchi
  0 siblings, 1 reply; 7+ messages in thread
From: Tom de Vries @ 2022-09-01  9:51 UTC (permalink / raw)
  To: gdb-patches

Hi,

Currently, we cannot build gdb without makeinfo installed.

It would be convenient to work around this by using the configure flag
MAKEINFO=/usr/bin/true or some such, but that doesn't work because top-level
configure requires a makeinfo of at least version 4.7, and that version check
fails for /usr/bin/true, so we end up with MAKEINFO=missing instead.

Work around this by adding a script gdb/contrib/makeinfo-dummy.sh that can be
used instead, like so:
...
$ ./src/configure MAKEINFO=$src/gdb/contrib/makeinfo-dummy.sh
...

The script merely prints the version string that satisfies the version check
in $src/configure.

Tested on x86_64-linux, with makeinfo removed.

Any comments?

Thanks,
- Tom

[gdb/build] Add gdb/contrib/makeinfo-dummy.sh

---
 gdb/contrib/makeinfo-dummy.sh | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gdb/contrib/makeinfo-dummy.sh b/gdb/contrib/makeinfo-dummy.sh
new file mode 100755
index 00000000000..9fed87ed6c6
--- /dev/null
+++ b/gdb/contrib/makeinfo-dummy.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# Copyright (C) 2022 Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This script can be used to build gdb in case makeinfo is not available, like
+# this:
+#
+#   $src/configure MAKEINFO=$src/gdb/contrib/makeinfo-dummy.sh.
+#
+# It currently does not do anything, so no *.info files are generated, but
+# that doesn't seem to break the build.
+
+if [ "$1" = "--version" ]; then
+    # The version corresponds to the required minimum version as specified in
+    # $src/configure.
+    echo "makeinfo (dummy texinfo) 4.7"
+fi

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

end of thread, other threads:[~2022-10-04 15:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01  9:51 [PATCH][gdb/build] Add gdb/contrib/makeinfo-dummy.sh Tom de Vries
2022-09-01 14:43 ` Simon Marchi
2022-09-01 14:58   ` Tom de Vries
2022-09-01 17:21     ` Simon Marchi
2022-09-05 14:10       ` Tom de Vries
2022-09-20 19:11         ` Tom Tromey
2022-10-04 15:37           ` Tom de Vries

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).