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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6EEC215800A for ; Tue, 18 Jul 2023 16:44:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1C7D9E07E2; Tue, 18 Jul 2023 16:44:49 +0000 (UTC) Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (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 EA380E07C7 for ; Tue, 18 Jul 2023 16:44:48 +0000 (UTC) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-577497ec6c6so57398177b3.2 for ; Tue, 18 Jul 2023 09:44:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689698688; x=1692290688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6bJn6cTCxtlyGAD735Cdk+rvMoXMiC9r1r0sZuA6B6U=; b=FkzCDn08G6liv8HjF206WjiKejzcWFE6bhvVh+JKLtiPkr++CJ9BHQ/uDJjlQmzvpq gfhd5WGiHgEGuDvrIGyfI0INBD2ZB+1pwlIyXWj3bccAZzQp8cK9xHlXCMY8B5d+jXrb 17tSuSoBR2TaHPLjZN70+6v2du+rYMK/ok/jFPFkbMa2qDTOXXZM+0Hu+SAkub9Vi7HF Cj26GWFVFofHmBlr9xeCFVtA66OQ7dA0/xGgPvQPs0RimqK4JC5A3fcFKJ07JdZMJF7V M83gLRicLdDIlIsE6XK3beiSzs8nZVgdYKoTRk0rxe1q2Yc/GqDX7+ssE9hXdSXRWWXQ dpmA== X-Gm-Message-State: ABy/qLYgoT5tX2P+XgauvfD3q5shnw9/TPZk9Xx9MKFNweZCshFCo2A4 P0cqdak7U0yy7Jez7lHU9J52BmWlJko= X-Google-Smtp-Source: APBJJlHL7GcmVn09856iLOgt9U6tsFjeuV8aQpI5opd76Tdb4yZuQQUu2UF0eZJ+S9ztxOtxKegikw== X-Received: by 2002:a0d:eb04:0:b0:582:5527:ddc with SMTP id u4-20020a0deb04000000b0058255270ddcmr13428641ywe.34.1689698687836; Tue, 18 Jul 2023 09:44:47 -0700 (PDT) Received: from localhost ([162.208.5.36]) by smtp.gmail.com with ESMTPSA id u67-20020a0dd246000000b0057a165e6ee1sm551961ywd.35.2023.07.18.09.44.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jul 2023 09:44:47 -0700 (PDT) From: Matt Turner To: gentoo-dev@lists.gentoo.org Cc: Jonas Rakebrandt , Matt Turner Subject: [gentoo-dev] [PATCH v2] meson.eclass: allow disabling verbose compilation Date: Tue, 18 Jul 2023 12:44:33 -0400 Message-ID: <20230718164433.1940514-1-mattst88@gentoo.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230717145104.1404135-1-mattst88@gentoo.org> References: <20230717145104.1404135-1-mattst88@gentoo.org> 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 Content-Transfer-Encoding: 8bit X-Archives-Salt: f4fa398f-8571-48cf-a623-2afee1470d4c X-Archives-Hash: 65cf8df7807eda2861f58fede8fce140 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=">=dev-util/meson-0.62.2 # Build directory, location where all generated files should be placed. # 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:=ON}" + # @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+=( --verbose ) ;; + esac + + mesoncompileargs+=( "$@" ) + set -- meson compile "${mesoncompileargs[@]}" echo "$@" >&2 "$@" || die "compile failed" -- 2.41.0