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 EF2C115800A for ; Mon, 17 Jul 2023 15:21:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B39C5E0845; Mon, 17 Jul 2023 15:21:31 +0000 (UTC) Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) (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 87DD9E083B for ; Mon, 17 Jul 2023 15:21:31 +0000 (UTC) Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-5701810884aso42412417b3.0 for ; Mon, 17 Jul 2023 08:21:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689607290; x=1692199290; 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=KJ/84v2IAjX+Ey0hJ/dFVuheuchpJwxyiip8fMrg3jw=; b=iZyE9xgtd29rbkYQqcqPxLOqD8ZTAwqjYQ6A/B5SBulEut2RSW1p92ovtSt9dm1akf 2c5gn9XBbVyLXeTBdcZshvVTkW1Jx0evppSdKYWU6N+UgloywIQLeM5r27QrDAhc/ogR MCWdHtYwdm65fxUU1jBJGqygZj4KNAZ7hjtyW0EyL5gJVE8BbHcyvnUVDdZH4tuYSfww l5JdPhnminCQPd11XnBE+I7Q0NkoPr6OtUiR/4FHwiUUH0U76pknvnse1OtkXGFfNmxP gCdRhVXUVywK43C5Ajv36IW4MGG4wECN6Jz4c2/5+nZbtUWWOM6EU3y6mkeVCHbuGa1b tJmQ== X-Gm-Message-State: ABy/qLZ79kM3bbBya5AN164MpFnVMK5/65A88NBuAB0/5CHw5exI5MOi b0il9GeIxi+YxAG/mS2vRuJlbLAF3LQ= X-Google-Smtp-Source: APBJJlG/AIQn1yBr1Gj9+5vrK1u8HeOT3KtsYqb9PsHgTooUGNWFalvGPUt2A7dimdWYqq/9t9bANQ== X-Received: by 2002:a81:5210:0:b0:577:3c17:5b2c with SMTP id g16-20020a815210000000b005773c175b2cmr11125183ywb.27.1689607290648; Mon, 17 Jul 2023 08:21:30 -0700 (PDT) Received: from localhost ([162.208.5.36]) by smtp.gmail.com with ESMTPSA id n200-20020a0dcbd1000000b005707b90331dsm3877672ywd.10.2023.07.17.08.21.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 08:21:30 -0700 (PDT) From: Matt Turner To: gentoo-dev@lists.gentoo.org Cc: floppym@gentoo.org, mgorny@gentoo.org, base-system@gentoo.org, kde@gentoo.org, Matt Turner Subject: [gentoo-dev] [PATCH 1/2] ninja-utils.eclass: Add NINJA_VERBOSE Date: Mon, 17 Jul 2023 11:21:22 -0400 Message-ID: <20230717152123.1467096-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: fc5cb0a8-9f15-49a4-9e70-20fd260bc3be X-Archives-Hash: 3776485b8b1ab7bb0c4e94d26d4cb2c4 ninja operates in one of three modes: - verbose (with -v): prints build commands - quiet (with --quiet): prints nothing - normal: prints [XX/YY]-style build status updates samurai works the same way, except it does not have a quiet mode. Thus we can't simply override ninja-utils' hard-coded flag from callers of eninja. Signed-off-by: Matt Turner --- eclass/ninja-utils.eclass | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass index e6d8c9e6c0a9..26ba31678f01 100644 --- a/eclass/ninja-utils.eclass +++ b/eclass/ninja-utils.eclass @@ -48,6 +48,12 @@ _NINJA_UTILS_ECLASS=1 # supposed to be set in make.conf. If unset, eninja() will convert # MAKEOPTS instead. +# @ECLASS_VARIABLE: NINJA_VERBOSE +# @USER_VARIABLE +# @DESCRIPTION: +# Set to OFF to disable verbose messages during compilation +: "${NINJA_VERBOSE:=ON}" + inherit multiprocessing case "${NINJA}" in @@ -80,7 +86,12 @@ get_NINJAOPTS() { # also supports being called via 'nonfatal'. eninja() { [[ -n "${NINJA_DEPEND}" ]] || ewarn "Unknown value '${NINJA}' for \${NINJA}" - set -- "${NINJA}" -v $(get_NINJAOPTS) "$@" + local v + case "${NINJA_VERBOSE}" in + OFF) ;; + *) v="-v" + esac + set -- "${NINJA}" ${v} $(get_NINJAOPTS) "$@" echo "$@" >&2 "$@" || die -n "${*} failed" } -- 2.41.0