From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id DE4563858C39 for ; Mon, 8 Apr 2024 10:01:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DE4563858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DE4563858C39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712570506; cv=none; b=BAW2UGHSLD+R/Wens1oKIPHG/ho2mM+OLHKePkyUqyX4U3RE+BYb1d7qWBdDmqp/C3wq2xWRA0XJBC5LmAi99y1WpTmCtvU5qGASCLzfUHiA3C1QbcwLcpQG/ZEjhesKhWysHfrqtmDVVHkAnvx6x2za5D8Fc92HNGZcU0JHr9I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712570506; c=relaxed/simple; bh=T1E1wBha7NqMxCDxwFFKr8af7FVCRqJnPGr3FiK4ngA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=YaN3iM8B19K9uSVsw2SEJCT0umDOx6RKNMaH7Sxsx7dS4L0Y9RjAV+JAjMJQBsbh3OoYCbEiUBinCYFSeJvVxd+02cdxvm6umY89XQ8VGVH6rbnXpa08WQdMq400niplYOeAif4lr6tQVsyES0uWydX12jP6/mcTa0pFKxJ563c= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712570504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wvtIQJHoNSx1/gbUl7XfSquASFLkNTqtNqpBeuHkVBs=; b=U/JhI8Bxlvx4QACAjs6L4sTPx93bKHmPvSnfmwOsd9f+Y7i0z9Kv4BLFAQVf8L/326F9es TwiznCtm67phHzmD6Lxsr8/FwarkXnEYBVdllcaSnzHa7p5GEX06e2yOnZ6u2knfdCbIaI i4dGh5C7RVn9lUmlw+P3bae2x21RGrc= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-R0shtihCM9O8t_45EFgaCg-1; Mon, 08 Apr 2024 06:01:43 -0400 X-MC-Unique: R0shtihCM9O8t_45EFgaCg-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a4e9ac44d37so262921366b.0 for ; Mon, 08 Apr 2024 03:01:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712570502; x=1713175302; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wvtIQJHoNSx1/gbUl7XfSquASFLkNTqtNqpBeuHkVBs=; b=MZzaLxqzfpE97Egd7XawRFsmJWIuK1tQVItD/OASb07wAH7OsTkp3eSfInL1KXlG5c Ytw2/4nL45ee1RrIu9idZodfOF0nd9yTjjpdelRMJu+zp6ngwY30ktqyaC09c+TdcnKq ihYw7vArAn0065KBAr5akfhUp4njARzz7/qeNRmlaTHNx7nJGlPht4IDYrhEwoW2qPTq jejnpyLFvOVDai6ARdgNei+f6x8ptGIXm4twWypnoacty1sCykuAo2sbRuGhVZ/ThLyg i1w3MEA5ib3dfC6GzUGY64K5wnIivAIAs9W8p1NEDe2Khpm5Cp/09xu0JO0aq7WoyMpE 22wA== X-Forwarded-Encrypted: i=1; AJvYcCXrH082mV5RmHQzbvN9AEbU98S1whVh9TKLdiHeMzwrPvY4tn2r2eojNjK4KQtNMGoFWXSw2umteg2chfy3iyYRZxjxvzQTG/4W7Q== X-Gm-Message-State: AOJu0Yy90RkesTENSoPuGPKFYF2SGzB6g8g27fhtmPe6X5aHpLu29xmA rsPEYT4l+++NvV0fjC+4BZU2d5VxRCg4GVrN37io1odBdpLJdaKev/xHX7n5iJG74bBPurvQTsn NwLtX7fHW64/MdTbI9eaJ2I3gEKqifKI3AMhYbzHkitnFXyNQCRli5h/SagTevGzPWOA= X-Received: by 2002:a17:907:1114:b0:a51:ad4e:15f0 with SMTP id qu20-20020a170907111400b00a51ad4e15f0mr4426784ejb.29.1712570501585; Mon, 08 Apr 2024 03:01:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHdSNuJMmC7KJkNvxdqgwYKwtHMU748hYC9FtfL7GHmKkwsRN41Gl/J7WqaFhLa0bqYLdP/Iw== X-Received: by 2002:a17:907:1114:b0:a51:ad4e:15f0 with SMTP id qu20-20020a170907111400b00a51ad4e15f0mr4426764ejb.29.1712570500947; Mon, 08 Apr 2024 03:01:40 -0700 (PDT) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id lx26-20020a170906af1a00b00a4e440989f5sm4226647ejb.159.2024.04.08.03.01.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 03:01:40 -0700 (PDT) From: Andrew Burgess To: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCHv2 5/6] gdb/configure: use AC_MSG_NOTICE not a direct echo call In-Reply-To: <9420bbb0-2614-4847-9157-8562f8a62d03@simark.ca> References: <51e77408f8d95ebdca75e56237b213c0368e996d.1712422921.git.aburgess@redhat.com> <9420bbb0-2614-4847-9157-8562f8a62d03@simark.ca> Date: Mon, 08 Apr 2024 11:01:39 +0100 Message-ID: <874jcc2mws.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: Simon Marchi 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 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