public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Andrew Burgess <aburgess@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCHv2 5/6] gdb/configure: use AC_MSG_NOTICE not a direct echo call
Date: Sun, 7 Apr 2024 23:14:21 -0400	[thread overview]
Message-ID: <9420bbb0-2614-4847-9157-8562f8a62d03@simark.ca> (raw)
In-Reply-To: <51e77408f8d95ebdca75e56237b213c0368e996d.1712422921.git.aburgess@redhat.com>



On 2024-04-06 13:03, Andrew Burgess wrote:
> 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.
> ---
>  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 ;;

The change looks fine to me, but I can't help but notice that the
indentation makes things hard to read here.  Especially the fact that
the AS_HELP_STRING is not indented w.r.t. AC_ARG_ENABLE.  If you want to
improve that at the same time I wouldn't be against it.

Simon

  reply	other threads:[~2024-04-08  3:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 12:21 [PATCH 0/4] gcore and config.status related Makefile changes Andrew Burgess
2024-04-05 12:21 ` [PATCH 1/4] gdb/Makefile: add gcore to the 'all' target dependency list Andrew Burgess
2024-04-05 12:21 ` [PATCH 2/4] gdb/Makefile: rewrite dependencies for config.status target Andrew Burgess
2024-04-05 12:21 ` [PATCH 3/4] gdb/Makefile: add some missing config.status dependencies Andrew Burgess
2024-04-05 12:21 ` [PATCH 4/4] gdb/Makefile: Print 'GEN' message, and pass SILENT_FLAG more Andrew Burgess
2024-04-06 17:03 ` [PATCHv2 0/6] gcore and config.status related Makefile changes Andrew Burgess
2024-04-06 17:03   ` [PATCHv2 1/6] gdb/Makefile: add gcore to the 'all' target dependency list Andrew Burgess
2024-04-06 17:03   ` [PATCHv2 2/6] gdb/Makefile: rewrite dependencies for config.status target Andrew Burgess
2024-04-08  3:09     ` Simon Marchi
2024-04-06 17:03   ` [PATCHv2 3/6] gdb/Makefile: add some missing config.status dependencies Andrew Burgess
2024-04-06 17:03   ` [PATCHv2 4/6] gdb/Makefile: Print 'GEN' message, and pass SILENT_FLAG more Andrew Burgess
2024-04-06 17:03   ` [PATCHv2 5/6] gdb/configure: use AC_MSG_NOTICE not a direct echo call Andrew Burgess
2024-04-08  3:14     ` Simon Marchi [this message]
2024-04-08 10:01       ` Andrew Burgess
2024-04-09 15:53     ` Tom Tromey
2024-04-06 17:03   ` [PATCHv2 6/6] gdb/build: apply silent-rules.mk to the data-directory Makefile.in Andrew Burgess
2024-04-08  3:32     ` Simon Marchi
2024-04-08  9:16       ` Andrew Burgess
2024-04-08  3:32   ` [PATCHv2 0/6] gcore and config.status related Makefile changes Simon Marchi
2024-04-08 10:01     ` Andrew Burgess

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=9420bbb0-2614-4847-9157-8562f8a62d03@simark.ca \
    --to=simark@simark.ca \
    --cc=aburgess@redhat.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).