From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20566 invoked by alias); 19 Nov 2010 20:55:20 -0000 Received: (qmail 20558 invoked by uid 22791); 19 Nov 2010 20:55:19 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Nov 2010 20:55:14 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAJKtCIA003321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Nov 2010 15:55:13 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAJKtC2h032248; Fri, 19 Nov 2010 15:55:12 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id oAJKtBwW005227; Fri, 19 Nov 2010 15:55:11 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 5B1653784F6; Fri, 19 Nov 2010 13:55:11 -0700 (MST) From: Tom Tromey To: gdb-patches@sourceware.org Subject: [2/2] RFA: --with-system-readline -vs- gdb.texinfo Date: Fri, 19 Nov 2010 20:55:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00270.txt.bz2 This is a new version of a patch we've been carrying in Fedora. Currently if you configure with --with-system-readline, the resulting gdb.info will still have its own copy of the readline manual. This is the wrong thing to do -- the gdb readline might be a different version, so the documentation might be misleading. This patch fixes the problem by making the uses of the included manual conditional on whether --with-system-readline was given. This particular patch relies on removing gdb/doc/configure. If that patch does not go in, I can change this one to suit. Tested by building both ways and looking at the appropriate nodes in the resulting .info file. Please review. Tom b/gdb/ChangeLog: 2010-11-19 Tom Tromey * configure: Rebuild. * configure.ac (READLINE_TEXI_INCFLAG): New subst. b/gdb/doc/ChangeLog: 2010-11-19 Tom Tromey * gdb.texinfo (Top): Check SYSTEM_READLINE. (Editing): Likewise. (Command History): Likewise. (TUI Keys): Likewise. (Bug Reporting): Conditionally include rluser.texi and inc-history.texinfo. * Makefile.in (READLINE_TEXI_INCFLAG): New variable. (GDB_DOC_SOURCE_INCLUDES): Add comment. (GDBvn.texi): Set SYSTEM_READLINE when appropriate. (gdb.dvi): Use READLINE_TEXI_INCFLAG. (gdb.pdf): Likewise. (gdb.info): Likewise. (gdb/index.html): Likewise. >From 6cd39e25c715dea6d09c0bc293b3fe3be011c5fd Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 19 Nov 2010 13:46:38 -0700 Subject: [PATCH 2/2] the patch --- gdb/ChangeLog | 5 +++++ gdb/configure | 4 ++++ gdb/configure.ac | 3 +++ gdb/doc/ChangeLog | 16 ++++++++++++++++ gdb/doc/Makefile.in | 15 +++++++++++---- gdb/doc/gdb.texinfo | 44 ++++++++++++++++++++++++++++++++++++++------ 6 files changed, 77 insertions(+), 10 deletions(-) diff --git a/gdb/configure.ac b/gdb/configure.ac index 230b128..cc750dc 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -538,6 +538,7 @@ if test "$with_system_readline" = yes; then READLINE=-lreadline READLINE_DEPS= READLINE_CFLAGS= + READLINE_TEXI_INCFLAG= # readline-6.0 started to use the name `_rl_echoing_p'. # `$(READLINE_DIR)/' of bundled readline would not resolve in configure. @@ -557,10 +558,12 @@ else READLINE='$(READLINE_DIR)/libreadline.a' READLINE_DEPS='$(READLINE)' READLINE_CFLAGS='-I$(READLINE_SRC)/..' + READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' fi AC_SUBST(READLINE) AC_SUBST(READLINE_DEPS) AC_SUBST(READLINE_CFLAGS) +AC_SUBST(READLINE_TEXI_INCFLAG) AC_ARG_WITH(expat, AS_HELP_STRING([--with-expat], [include expat support (auto/yes/no)]), diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in index a572f90..615af63 100644 --- a/gdb/doc/Makefile.in +++ b/gdb/doc/Makefile.in @@ -63,6 +63,7 @@ BUGURL_TEXI = @REPORT_BUGS_TEXI@ # Where is the source dir for the READLINE library doc? # Traditionally readline is in .. or . READLINE_DIR = ${gdbdir}/../readline/doc +READLINE_TEXI_INCFLAG = @READLINE_TEXI_INCFLAG@ # The GDB/MI docs come from a sibling directory ../mi GDBMI_DIR = ${gdbdir}/mi @@ -108,6 +109,9 @@ PDFTEX = pdftex DVIPS = dvips # Main GDB manual +# Note that this unconditionally includes the readline texi files, +# even when --with-system-readline is used. This is harmless because +# these are only used as dependencies. GDB_DOC_SOURCE_INCLUDES = \ $(srcdir)/fdl.texi \ $(srcdir)/gpl.texi \ @@ -303,6 +307,9 @@ GDBvn.texi : ${gdbdir}/version.in if [ "$(BUGURL_TEXI)" = "@uref{http://www.gnu.org/software/gdb/bugs/}" ]; then \ echo "@set BUGURL_DEFAULT" >> ./GDBvn.new; \ fi + if test -z "$(READLINE_TEXI_INCFLAG)"; then \ + echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \ + fi mv GDBvn.new GDBvn.texi # Updated atomically @@ -340,7 +347,7 @@ gdb.dvi: ${GDB_DOC_FILES} ln $(srcdir)/GDBvn.texi . || \ cp $(srcdir)/GDBvn.texi . ; else true; fi rm -f $(GDB_TEX_TMPS) - $(TEXI2DVI) -I ${READLINE_DIR} -I ${GDBMI_DIR} -I $(srcdir) \ + $(TEXI2DVI) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \ $(srcdir)/gdb.texinfo gdb.ps: gdb.dvi @@ -352,12 +359,12 @@ gdb.pdf: ${GDB_DOC_FILES} ln $(srcdir)/GDBvn.texi . || \ cp $(srcdir)/GDBvn.texi . ; else true; fi rm -f $(GDB_TEX_TMPS) - $(TEXI2DVI) --pdf -I ${READLINE_DIR} -I ${GDBMI_DIR} -I $(srcdir) \ + $(TEXI2DVI) --pdf $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \ $(srcdir)/gdb.texinfo # GDB MANUAL: info file gdb.info: ${GDB_DOC_FILES} - $(MAKEINFO) -I ${READLINE_DIR} -I ${GDBMI_DIR} -I $(srcdir) \ + $(MAKEINFO) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \ -o gdb.info $(srcdir)/gdb.texinfo # GDB MANUAL: roff translations @@ -433,7 +440,7 @@ gdb.mm: $(GDB_DOC_FILES) links2roff # GDB MANUAL: HTML file gdb/index.html: ${GDB_DOC_FILES} - $(MAKEHTML) $(MAKEHTMLFLAGS) -I ${READLINE_DIR} -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo + $(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo # Clean these up before each run. Avoids a catch 22 with not being # able to re-generate these files (to fix a corruption) because these diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index ddc711b..18aa224 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -163,8 +163,14 @@ software in general. We will miss him. * GDB Bugs:: Reporting bugs in @value{GDBN} +@ifset SYSTEM_READLINE +* Command Line Editing: (rluserman). Command Line Editing +* Using History Interactively: (history). Using History Interactively +@end ifset +@ifclear SYSTEM_READLINE * Command Line Editing:: Command Line Editing * Using History Interactively:: Using History Interactively +@end ifclear * Formatting Documentation:: How to format and print @value{GDBN} documentation * Installing GDB:: Installing GDB * Maintenance Commands:: Maintenance Commands @@ -19414,7 +19420,13 @@ Disable command line editing. Show whether command line editing is enabled. @end table -@xref{Command Line Editing}, for more details about the Readline +@ifset SYSTEM_READLINE +@xref{Command Line Editing, , , rluserman, GNU Readline Library}, +@end ifset +@ifclear SYSTEM_READLINE +@xref{Command Line Editing}, +@end ifclear +for more details about the Readline interface. Users unfamiliar with @sc{gnu} Emacs or @code{vi} are encouraged to read that chapter. @@ -19428,8 +19440,14 @@ happened. Use these commands to manage the @value{GDBN} command history facility. @value{GDBN} uses the @sc{gnu} History library, a part of the Readline -package, to provide the history facility. @xref{Using History -Interactively}, for the detailed description of the History library. +package, to provide the history facility. +@ifset SYSTEM_READLINE +@xref{Using History Interactively, , , history, GNU History Library}, +@end ifset +@ifclear SYSTEM_READLINE +@xref{Using History Interactively}, +@end ifclear +for the detailed description of the History library. To issue a command to @value{GDBN} without affecting certain aspects of the state which is seen by users, prefix it with @samp{server } @@ -19481,7 +19499,13 @@ This defaults to the value of the environment variable @end table History expansion assigns special meaning to the character @kbd{!}. -@xref{Event Designators}, for more details. +@ifset SYSTEM_READLINE +@xref{Using History Interactively, , , history, GNU History Library}, +@end ifset +@ifclear SYSTEM_READLINE +@xref{Using History Interactively}, +@end ifclear +for more details. @cindex history expansion, turn on/off Since @kbd{!} is also the logical not operator in C, history expansion @@ -23482,8 +23506,14 @@ Indicates the current program counter address. @cindex TUI key bindings The TUI installs several key bindings in the readline keymaps -(@pxref{Command Line Editing}). The following key bindings -are installed for both TUI mode and the @value{GDBN} standard mode. +@ifset SYSTEM_READLINE +(@pxref{Command Line Editing, , , rluserman, GNU Readline Library}). +@end ifset +@ifclear SYSTEM_READLINE +(@pxref{Command Line Editing}). +@end ifclear +The following key bindings are installed for both TUI mode and the +@value{GDBN} standard mode. @table @kbd @kindex C-x C-a @@ -30459,8 +30489,10 @@ things without first using the debugger to find the facts. @c inc-hist.texinfo @c Use -I with makeinfo to point to the appropriate directory, @c environment var TEXINPUTS with TeX. +@ifclear SYSTEM_READLINE @include rluser.texi @include inc-hist.texinfo +@end ifclear @node Formatting Documentation -- 1.7.2.3