public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/configure: use AC_MSG_NOTICE not a direct echo call
@ 2024-04-08  9:27 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2024-04-08  9:27 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ff69d6e9af3bb04cd484f48661d5e47ea366b2d5

commit ff69d6e9af3bb04cd484f48661d5e47ea366b2d5
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Sat Apr 6 16:39:34 2024 +0100

    gdb/configure: use AC_MSG_NOTICE not a direct echo call
    
    After the recent commits, I noticed that GDB's configure script would
    still emit two lines even when run in silent mode.  If you touch
    gdb/Makefile.in and then run 'make all' in the gdb/ build directory
    you'll see this:
    
        GEN    config.status
      enable_sim = no
      enableval = no
    
    Obviously the 'no' might be 'yes' depending on how you actually
    configured GDB.
    
    This is caused by two direct invocations of 'echo' in GDB's
    configure.ac script.
    
    In this commit I replace these calls with use of AC_MSG_NOTICE
    instead.  Now when configure is run with the --silent command line
    option these lines will not be printed.
    
    There should be no changes in the built GDB after this commit.
    
    Approved-By: Simon Marchi <simon.marchi@efficios.com>

Diff:
---
 gdb/configure    | 6 ++++--
 gdb/configure.ac | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index d0fd1760b88..ffbc14493e2 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -32848,8 +32848,10 @@ fi
 #
 # Check whether --enable-sim was given.
 if test "${enable_sim+set}" = set; then :
-  enableval=$enable_sim; echo "enable_sim = $enable_sim";
- echo "enableval = ${enableval}";
+  enableval=$enable_sim; { $as_echo "$as_me:${as_lineno-$LINENO}: enable_sim = $enable_sim" >&5
+$as_echo "$as_me: enable_sim = $enable_sim" >&6;};
+ { $as_echo "$as_me:${as_lineno-$LINENO}: enableval = ${enableval}" >&5
+$as_echo "$as_me: enableval = ${enableval}" >&6;};
  case "${enableval}" in
   yes) ignore_sim=false ;;
   no)  ignore_sim=true ;;
diff --git a/gdb/configure.ac b/gdb/configure.ac
index aa91bfb3a17..28e750b6b43 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -2032,8 +2032,8 @@ AC_PATH_X
 #
 AC_ARG_ENABLE(sim,
 AS_HELP_STRING([--enable-sim], [link gdb with simulator]),
-[echo "enable_sim = $enable_sim";
- echo "enableval = ${enableval}";
+[AC_MSG_NOTICE([enable_sim = $enable_sim]);
+ AC_MSG_NOTICE([enableval = ${enableval}]);
  case "${enableval}" in
   yes) ignore_sim=false ;;
   no)  ignore_sim=true ;;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-08  9:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-08  9:27 [binutils-gdb] gdb/configure: use AC_MSG_NOTICE not a direct echo call Andrew Burgess

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