From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0A25E3858D28 for ; Mon, 8 Apr 2024 03:14:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A25E3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0A25E3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712546063; cv=none; b=UFSxT+Ee+TCcNcKQtj+wgHJeBfmwNL6mlam3PnM6LsTB3GZcHwFytpHjNwXsIDJJCW3NrPxb6iftOmu3Q9c+F8UxF1t0ZTU+TXuSxDv4PtIqBd21eWt1kKRKzdBUB+NVyZflEEfIcx89LkIU3zJsuTwmPu6j6+Bqn63aANX4v+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712546063; c=relaxed/simple; bh=H497CZwesCBKzqQq3Lj16Gu6jB/bvLuZONu/IbN8GmE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=MPqqvJxhf143hVLdTLAJXMsZoVi5t+SgZNvWu9R7vJ0kQSXaqrGV1tj4HCIoAAy/+ZOLO4s81262erVJImwbz6eDERTjVVKSZ50nPX7S60eVBdnnCBqexSdVCxj/u4nJq5YSeXq9PIkae2bRwshxARqrKJoGfZtJtyhnlbdWKaA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1712546061; bh=H497CZwesCBKzqQq3Lj16Gu6jB/bvLuZONu/IbN8GmE=; h=Date:Subject:To:References:From:In-Reply-To:From; b=pPKKEdzuQM7/u9Uh81BGh+fp5XWXliUOHg/R7yyGG1JSeC2YbY1TkNN84xJgdo57a qWlXKuNn1dImAyKqheHOMbm451zs02lvcQsPOEYfYsVdDBsuw0GoZuJGGW6t0JgAKz k72+ATWRljO486tqcL3X4fV4A8RU0uFONOx95Nwg= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 7A4FC1E092; Sun, 7 Apr 2024 23:14:21 -0400 (EDT) Message-ID: <9420bbb0-2614-4847-9157-8562f8a62d03@simark.ca> Date: Sun, 7 Apr 2024 23:14:21 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCHv2 5/6] gdb/configure: use AC_MSG_NOTICE not a direct echo call To: Andrew Burgess , gdb-patches@sourceware.org References: <51e77408f8d95ebdca75e56237b213c0368e996d.1712422921.git.aburgess@redhat.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <51e77408f8d95ebdca75e56237b213c0368e996d.1712422921.git.aburgess@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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