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 637F615800A for ; Mon, 17 Jul 2023 14:51:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95B6AE083E; Mon, 17 Jul 2023 14:51:12 +0000 (UTC) Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) (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 688EFE077D for ; Mon, 17 Jul 2023 14:51:12 +0000 (UTC) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-577497ec6c6so41799917b3.2 for ; Mon, 17 Jul 2023 07:51:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689605471; x=1692197471; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=X5wnBvmWi20KVFacsoC3wIN/SvlkrnTgwoQzwxSC5+c=; b=TeBRICzyVt6tZBs0Wj20dNQcT7jFwPw8hqyNc/vRvHC0CnX/9lwxuA+8bBOe9blUTY 2NOzi1rMBEAtfsF873uD+L1eH7Eboz3+VKX9fNTB7wtfP9JPLlwdBOp+y1KhIIz4P6EJ I5yDpEX+h3Z7KAXBNuM3YZCBuzrFMGOs0PGbLx2df28WDEOx7QegE/xe742nU64J4Q4y TpwS73Ct1GroF6ZEnhCf+6/AuwJnIl1PiEYifpnMoH872Bm34UUvVmCTzDakaFtEOHEU u6ei2mJi16v+SGXzxJJ/mpS7GUd5+i/2npT4MYDL5ei1SMO+K4XhPgK8QSbKokm8Iiu5 RXZw== X-Gm-Message-State: ABy/qLYAcGc7x+xwA9NX4c+2BlmVIFEPLnyD0OOn/aRAaoi1XelkbWfn lXqVFNJqC6iuLkSuMh7/6oYl9O9dWN8= X-Google-Smtp-Source: APBJJlFAryFyGVsRlIAQW64gFD7P1eHHFymb0H2qZ1vBJ9jeu6xbhvg5Uk94L67IJfpEI+oF7goN+w== X-Received: by 2002:a81:4995:0:b0:583:438f:80af with SMTP id w143-20020a814995000000b00583438f80afmr1780690ywa.42.1689605471535; Mon, 17 Jul 2023 07:51:11 -0700 (PDT) Received: from localhost ([162.208.5.36]) by smtp.gmail.com with ESMTPSA id j128-20020a0de086000000b00577409a2958sm3883443ywe.138.2023.07.17.07.51.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 07:51:11 -0700 (PDT) From: Matt Turner To: gentoo-dev@lists.gentoo.org Cc: Jonas Rakebrandt , Matt Turner Subject: [gentoo-dev] [PATCH] meson.eclass: allow disabling verbose compilation Date: Mon, 17 Jul 2023 10:51:04 -0400 Message-ID: <20230717145104.1404135-1-mattst88@gentoo.org> X-Mailer: git-send-email 2.41.0 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: 7994063e-54bf-4fb5-8d5d-75b402a8fbd3 X-Archives-Hash: 04c884f597ceb091443ebfc915240353 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 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 2c274b213191..1acdee9325b2 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_QUIET +# @USER_VARIABLE +# @DEFAULT_UNSET +# @DESCRIPTION: +# Disables verbose messages during compilation if non-empty. + # @ECLASS_VARIABLE: EMESON_BUILDTYPE # @DESCRIPTION: # The buildtype value to pass to meson setup. @@ -385,10 +391,14 @@ meson_src_compile() { -C "${BUILD_DIR}" --jobs "$(makeopts_jobs "${MAKEOPTS}" 0)" --load-average "$(makeopts_loadavg "${MAKEOPTS}" 0)" - --verbose - "$@" ) + if [[ -z ${MESON_QUIET} ]]; then + mesoncompileargs+=( --verbose ) + fi + + mesoncompileargs+=( "$@" ) + set -- meson compile "${mesoncompileargs[@]}" echo "$@" >&2 "$@" || die "compile failed" -- 2.41.0