From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4251DC4332F for ; Thu, 3 Mar 2022 16:05:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234819AbiCCQFx (ORCPT ); Thu, 3 Mar 2022 11:05:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234808AbiCCQFh (ORCPT ); Thu, 3 Mar 2022 11:05:37 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CC411986ED for ; Thu, 3 Mar 2022 08:04:49 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id q20so1106923wmq.1 for ; Thu, 03 Mar 2022 08:04:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=URGGrpNKk6KnFp1JnfnJW8w7TBd3bHGILoNvosl+MzA=; b=muxlyisXZkawPumKUs3VSubtUYGyUN/B8DoQZjHc7zHmjPMJ+6h5ZUTZi5Mi9lzujn bhRReCxn4BqJ2VQRyud0bT+Hhjy7/jVZyYT+HGqoIJlf89+37ha8pBZuRSzcg6tAP0nK ago5gLGBfCMyv9T3hYT5PrR5YJ3ZnoqP7z4vgRwaOi0ip1XsGg1nVZrFHKjiZ9NbTFJl dycj3rqTLGaipSSWJSBhgI6QX1eCD++lPatXaYZaeqi1FMwNMczIOafEJNNPbXEKZHkH InCmjUTjtkXGNlTDPoIt0JXuK1mrnOcssWVr88lMIU1vhtA7llXP9uq1eeBWqEjerLiY cMkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=URGGrpNKk6KnFp1JnfnJW8w7TBd3bHGILoNvosl+MzA=; b=vnH3jOPrnpMSyu6Z/Yde+nS0c2TlOMY90LBzWU5HQS/prlRE1dHdyE7dzeWvgX1ZkY qPF3mIMMkNwKBUv3kSBbCD7oaj77Vr3U6yXyFfLWmH8xy81VcakJ/AV57zDXY7LUvv+3 ImyAGoC95Y7XKTq14SSdG0LVPCkC7XbWHuifDg2OiQnEMaL6L9P5MtYE0TE/rP8FMDzl hoQAsKZwCs2/UHjL0Js4sUMkaTot3CW8idjLeZosH0NAVoJ57m6WeBcADpCW8ySlCzlc LqwOULqDdlYz5XUiqi8k7kVLIcgbIEOrE769hzpIE/Vs3MZFSpXqbon9zp4ikSH2PFpv NFaw== X-Gm-Message-State: AOAM533mTQ1BZnpZzb1UyzThPCN8lC/yOH093KeArgjok91zI9bYAnmn 0XcPBwIvCLD4wOoFDTZY5txd8DASDYPjHQ== X-Google-Smtp-Source: ABdhPJzpcPbzPVjald6elpiUQ7il0+MZJuFDGSYwM+9wqpZWYR4tVgB7vvoqcI1F/i3t6ASsOE3kZg== X-Received: by 2002:a05:600c:4e10:b0:381:a004:5855 with SMTP id b16-20020a05600c4e1000b00381a0045855mr4397228wmq.70.1646323487344; Thu, 03 Mar 2022 08:04:47 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id m13-20020a05600c4f4d00b00386744cb31bsm4040667wmq.35.2022.03.03.08.04.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 08:04:46 -0800 (PST) From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= To: git@vger.kernel.org Cc: Junio C Hamano , Phillip Wood , Jeff King , Dan Jacques , Eric Wong , Jonathan Nieder , Mike Hommey , =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= , Victoria Dye , Eric Sunshine , Taylor Blau , =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Subject: [PATCH v5 7/8] Makefile: add "$(QUIET)" boilerplate to shared.mak Date: Thu, 3 Mar 2022 17:04:18 +0100 Message-Id: X-Mailer: git-send-email 2.35.1.1230.ga6e6579e98c In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The $(QUIET) variables we define are largely duplicated between our various Makefiles, let's define them in the new "shared.mak" instead. Since we're not using the environment to pass these around we don't need to export the "QUIET_GEN" and "QUIET_BUILT_IN" variables anymore. The "QUIET_GEN" variable is used in "git-gui/Makefile" and "gitweb/Makefile", but they've got their own definition for those. The "QUIET_BUILT_IN" variable is only used in the top-level "Makefile". We still need to export the "V" variable. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/Makefile | 32 ------------------------- Makefile | 33 ------------------------- config.mak.uname | 1 - contrib/scalar/Makefile | 14 ----------- shared.mak | 53 +++++++++++++++++++++++++++++++++++++++++ templates/Makefile | 5 ---- 6 files changed, 53 insertions(+), 85 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index ba27456c86a..0f4ebdeda8a 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -218,38 +218,6 @@ DEFAULT_EDITOR_SQ = $(subst ','\'',$(DEFAULT_EDITOR)) ASCIIDOC_EXTRA += -a 'git-default-editor=$(DEFAULT_EDITOR_SQ)' endif -QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir -QUIET_SUBDIR1 = - -ifneq ($(findstring $(MAKEFLAGS),w),w) -PRINT_DIR = --no-print-directory -else # "make -w" -NO_SUBDIR = : -endif - -ifneq ($(findstring $(MAKEFLAGS),s),s) -ifndef V - QUIET = @ - QUIET_ASCIIDOC = @echo ' ' ASCIIDOC $@; - QUIET_XMLTO = @echo ' ' XMLTO $@; - QUIET_DB2TEXI = @echo ' ' DB2TEXI $@; - QUIET_MAKEINFO = @echo ' ' MAKEINFO $@; - QUIET_DBLATEX = @echo ' ' DBLATEX $@; - QUIET_XSLTPROC = @echo ' ' XSLTPROC $@; - QUIET_GEN = @echo ' ' GEN $@; - QUIET_STDERR = 2> /dev/null - QUIET_SUBDIR0 = +@subdir= - QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ - $(MAKE) $(PRINT_DIR) -C $$subdir - - QUIET_LINT_GITLINK = @echo ' ' LINT GITLINK $<; - QUIET_LINT_MANSEC = @echo ' ' LINT MAN SEC $<; - QUIET_LINT_MANEND = @echo ' ' LINT MAN END $<; - - export V -endif -endif - all: html man html: $(DOC_HTML) diff --git a/Makefile b/Makefile index 1e7a1277ce9..d4c0f4ca7b8 100644 --- a/Makefile +++ b/Makefile @@ -2001,39 +2001,6 @@ ifndef PAGER_ENV PAGER_ENV = LESS=FRX LV=-c endif -QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir -QUIET_SUBDIR1 = - -ifneq ($(findstring w,$(MAKEFLAGS)),w) -PRINT_DIR = --no-print-directory -else # "make -w" -NO_SUBDIR = : -endif - -ifneq ($(findstring s,$(MAKEFLAGS)),s) -ifndef V - QUIET_CC = @echo ' ' CC $@; - QUIET_AR = @echo ' ' AR $@; - QUIET_LINK = @echo ' ' LINK $@; - QUIET_BUILT_IN = @echo ' ' BUILTIN $@; - QUIET_GEN = @echo ' ' GEN $@; - QUIET_LNCP = @echo ' ' LN/CP $@; - QUIET_XGETTEXT = @echo ' ' XGETTEXT $@; - QUIET_MSGFMT = @echo ' ' MSGFMT $@; - QUIET_GCOV = @echo ' ' GCOV $@; - QUIET_SP = @echo ' ' SP $<; - QUIET_HDR = @echo ' ' HDR $(<:hcc=h); - QUIET_RC = @echo ' ' RC $@; - QUIET_SPATCH = @echo ' ' SPATCH $<; - QUIET_SUBDIR0 = +@subdir= - QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ - $(MAKE) $(PRINT_DIR) -C $$subdir - export V - export QUIET_GEN - export QUIET_BUILT_IN -endif -endif - ifdef NO_INSTALL_HARDLINKS export NO_INSTALL_HARDLINKS endif diff --git a/config.mak.uname b/config.mak.uname index 4352ea39e9b..7727b707b74 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -727,7 +727,6 @@ vcxproj: git diff-index --cached --quiet HEAD -- # Make .vcxproj files and add them - unset QUIET_GEN QUIET_BUILT_IN; \ perl contrib/buildsystems/generate -g Vcxproj git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj diff --git a/contrib/scalar/Makefile b/contrib/scalar/Makefile index d585b319edc..5e86d78e19b 100644 --- a/contrib/scalar/Makefile +++ b/contrib/scalar/Makefile @@ -8,20 +8,6 @@ include ../../config.mak.uname -include ../../config.mak.autogen -include ../../config.mak -QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir -QUIET_SUBDIR1 = - -ifneq ($(findstring s,$(MAKEFLAGS)),s) -ifndef V - QUIET_GEN = @echo ' ' GEN $@; - QUIET_SUBDIR0 = +@subdir= - QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ - $(MAKE) $(PRINT_DIR) -C $$subdir -else - export V -endif -endif - TARGETS = scalar$(X) scalar.o GITLIBS = ../../common-main.o ../../libgit.a ../../xdiff/lib.a diff --git a/shared.mak b/shared.mak index 934bf428936..c45b2812eb6 100644 --- a/shared.mak +++ b/shared.mak @@ -31,3 +31,56 @@ comma := , empty := space := $(empty) $(empty) + +### Quieting +## common +QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir +QUIET_SUBDIR1 = + +ifneq ($(findstring w,$(MAKEFLAGS)),w) +PRINT_DIR = --no-print-directory +else # "make -w" +NO_SUBDIR = : +endif + +ifneq ($(findstring s,$(MAKEFLAGS)),s) +ifndef V +## common + QUIET_SUBDIR0 = +@subdir= + QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ + $(MAKE) $(PRINT_DIR) -C $$subdir + + QUIET = @ + QUIET_GEN = @echo ' ' GEN $@; + +## Used in "Makefile" + QUIET_CC = @echo ' ' CC $@; + QUIET_AR = @echo ' ' AR $@; + QUIET_LINK = @echo ' ' LINK $@; + QUIET_BUILT_IN = @echo ' ' BUILTIN $@; + QUIET_LNCP = @echo ' ' LN/CP $@; + QUIET_XGETTEXT = @echo ' ' XGETTEXT $@; + QUIET_MSGFMT = @echo ' ' MSGFMT $@; + QUIET_GCOV = @echo ' ' GCOV $@; + QUIET_SP = @echo ' ' SP $<; + QUIET_HDR = @echo ' ' HDR $(<:hcc=h); + QUIET_RC = @echo ' ' RC $@; + QUIET_SPATCH = @echo ' ' SPATCH $<; + +## Used in "Documentation/Makefile" + QUIET_ASCIIDOC = @echo ' ' ASCIIDOC $@; + QUIET_XMLTO = @echo ' ' XMLTO $@; + QUIET_DB2TEXI = @echo ' ' DB2TEXI $@; + QUIET_MAKEINFO = @echo ' ' MAKEINFO $@; + QUIET_DBLATEX = @echo ' ' DBLATEX $@; + QUIET_XSLTPROC = @echo ' ' XSLTPROC $@; + QUIET_GEN = @echo ' ' GEN $@; + QUIET_STDERR = 2> /dev/null + + QUIET_LINT_GITLINK = @echo ' ' LINT GITLINK $<; + QUIET_LINT_MANSEC = @echo ' ' LINT MAN SEC $<; + QUIET_LINT_MANEND = @echo ' ' LINT MAN END $<; + + export V +endif +endif diff --git a/templates/Makefile b/templates/Makefile index 636cee52f51..367ad00c24c 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -2,11 +2,6 @@ include ../shared.mak # make and install sample templates - -ifndef V - QUIET = @ -endif - INSTALL ?= install TAR ?= tar RM ?= rm -f -- 2.35.1.1230.ga6e6579e98c