From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9D01315800A for ; Thu, 20 Jul 2023 15:00:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 90C20E0877; Thu, 20 Jul 2023 15:00:42 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 51EA0E0872 for ; Thu, 20 Jul 2023 15:00:42 +0000 (UTC) Received: by mail-ua1-f44.google.com with SMTP id a1e0cc1a2514c-794779e1044so334791241.2 for ; Thu, 20 Jul 2023 08:00:41 -0700 (PDT) X-Gm-Message-State: ABy/qLagN/7Jn352L+RCk0b+9IDhsvh+AvOdBb/XELca1ea/v9BUyelA unXviA8Hz/zZW0upSs3FuAZQBWTLKglvRRFOvro= X-Google-Smtp-Source: APBJJlHokpJBbORwxs1MI6HaUYCJ+iPFgpbFFC0srS3r0IPsz9ReEJSVTwRN1ejVXnMv/51WOk2e1z3MY175W9MtGn8= X-Received: by 2002:a67:edd7:0:b0:444:c0d7:5e9f with SMTP id e23-20020a67edd7000000b00444c0d75e9fmr3562730vsp.25.1689865239478; Thu, 20 Jul 2023 08:00:39 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <20230717145104.1404135-1-mattst88@gentoo.org> <20230718164433.1940514-1-mattst88@gentoo.org> <5abedff6-f348-d5fd-2ee4-552488491f4a@gentoo.org> In-Reply-To: <5abedff6-f348-d5fd-2ee4-552488491f4a@gentoo.org> From: Matt Turner Date: Thu, 20 Jul 2023 11:00:28 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-dev] [PATCH v2] meson.eclass: allow disabling verbose compilation To: Florian Schmaus Cc: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 19440f22-4ac6-4e99-86bd-ca5d307cc020 X-Archives-Hash: beb2597c3e0701754bcf987a09594696 On Wed, Jul 19, 2023 at 3:23=E2=80=AFAM Florian Schmaus w= rote: > > On 18/07/2023 18.44, Matt Turner wrote: > > From: Jonas Rakebrandt > > > > This works similar to cmake.eclass's ${CMAKE_VERBOSE}. > > > > Closes: https://github.com/gentoo/gentoo/pull/28942 > > Signed-off-by: Jonas Rakebrandt > > Signed-off-by: Matt Turner > > --- > > eclass/meson.eclass | 15 +++++++++++++-- > > 1 file changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/eclass/meson.eclass b/eclass/meson.eclass > > index 2c274b213191..3b30f66bf30a 100644 > > --- a/eclass/meson.eclass > > +++ b/eclass/meson.eclass > > @@ -55,6 +55,12 @@ BDEPEND=3D">=3Ddev-util/meson-0.62.2 > > # Build directory, location where all generated files should be place= d. > > # If this isn't set, it defaults to ${WORKDIR}/${P}-build. > > > > +# @ECLASS_VARIABLE: MESON_VERBOSE > > +# @USER_VARIABLE > > +# @DESCRIPTION: > > +# Set to OFF to disable verbose messages during compilation > > +: "${MESON_VERBOSE:=3DON}" > > + > > # @ECLASS_VARIABLE: EMESON_BUILDTYPE > > # @DESCRIPTION: > > # The buildtype value to pass to meson setup. > > @@ -385,10 +391,15 @@ meson_src_compile() { > > -C "${BUILD_DIR}" > > --jobs "$(makeopts_jobs "${MAKEOPTS}" 0)" > > --load-average "$(makeopts_loadavg "${MAKEOPTS}" 0)" > > - --verbose > > - "$@" > > ) > > > > + case ${MESON_VERBOSE} in > > + OFF) ;; > > + *) mesoncompileargs+=3D( --verbose ) ;; > > + esac > > No strong opinion, just to educate myself, but is there an advantage of > using case/easc over if/fi here? > > That is > > if [[ ${MESON_VERBOSE} !=3D off ]]; then > mesoncompileargs+=3D( --verbose ) > fi > > or even the shell-style short idiom using ||. No advantage as far as I'm aware. I was just copying the style used in cmake.eclass. I really wish bash just had boolean types :(