public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCHv2 5/6] gdb/configure: use AC_MSG_NOTICE not a direct echo call
Date: Mon, 08 Apr 2024 11:01:39 +0100	[thread overview]
Message-ID: <874jcc2mws.fsf@redhat.com> (raw)
In-Reply-To: <9420bbb0-2614-4847-9157-8562f8a62d03@simark.ca>

Simon Marchi <simark@simark.ca> writes:

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

Thanks for the feedback.  I pushed the patch below which realigns this
part of the configure.ac script.

Thanks,
Andrew

---

commit 36192c2be137d2af13fbc2d528de05b41d546805
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Mon Apr 8 10:56:51 2024 +0100

    gdb/configure: realign the AC_ARG_ENABLE(sim, ....) block
    
    Following the suggestion in this review comment:
    
      https://inbox.sourceware.org/gdb-patches/9420bbb0-2614-4847-9157-8562f8a62d03@simark.ca
    
    this commit realigns the AC_ARG_ENABLE(sim, ....) block.  I've added
    additional [...] quoting in a couple of places, which is inline with
    how other AC_ARG_ENABLE blocks are formatted within GDB's configure.ac
    file.
    
    There should be no change in how GDB configures or builds after this
    commit.

diff --git a/gdb/configure b/gdb/configure
index ffbc14493e2..a77e3e27332 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -32850,13 +32850,13 @@ fi
 if test "${enable_sim+set}" = set; then :
   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:${as_lineno-$LINENO}: enableval = ${enableval}" >&5
 $as_echo "$as_me: enableval = ${enableval}" >&6;};
- case "${enableval}" in
-  yes) ignore_sim=false ;;
-  no)  ignore_sim=true ;;
-  *)   ignore_sim=false ;;
- esac
+	       case "${enableval}" in
+		 yes) ignore_sim=false ;;
+		 no)  ignore_sim=true ;;
+		 *)   ignore_sim=false ;;
+	       esac
 else
   ignore_sim=false
 fi
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 28e750b6b43..62ff09cea20 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -2030,16 +2030,16 @@ AC_PATH_X
 # are when --disable-sim is specified, or if the simulator directory is
 # not part of the source tree.
 #
-AC_ARG_ENABLE(sim,
-AS_HELP_STRING([--enable-sim], [link gdb with simulator]),
-[AC_MSG_NOTICE([enable_sim = $enable_sim]);
- AC_MSG_NOTICE([enableval = ${enableval}]);
- case "${enableval}" in
-  yes) ignore_sim=false ;;
-  no)  ignore_sim=true ;;
-  *)   ignore_sim=false ;;
- esac],
-[ignore_sim=false])
+AC_ARG_ENABLE([sim],
+	      [AS_HELP_STRING([--enable-sim], [link gdb with simulator])],
+	      [AC_MSG_NOTICE([enable_sim = $enable_sim]);
+	       AC_MSG_NOTICE([enableval = ${enableval}]);
+	       case "${enableval}" in
+		 yes) ignore_sim=false ;;
+		 no)  ignore_sim=true ;;
+		 *)   ignore_sim=false ;;
+	       esac],
+	       [ignore_sim=false])
 
 if test ! -d "${srcdir}/../sim"; then
   ignore_sim=true


  reply	other threads:[~2024-04-08 10:01 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
2024-04-08 10:01       ` Andrew Burgess [this message]
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=874jcc2mws.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /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).