From patchwork Thu Dec 22 16:25:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 35873 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp44531wrn; Thu, 22 Dec 2022 08:28:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXv17BH7TYyeg/qXY9UZlslYtF3yOOApOJpbtNTozXw1tEa8KKoKcyNOUK8OwylVDGZkJzwk X-Received: by 2002:a05:6402:685:b0:479:ab7d:1dad with SMTP id f5-20020a056402068500b00479ab7d1dadmr6549819edy.32.1671726496041; Thu, 22 Dec 2022 08:28:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671726496; cv=none; d=google.com; s=arc-20160816; b=MlKExhmkrTVYG/PRvrA1UVdUmwagK7ckB39AUxaehp9PBaQX/ZN4wAGw1yFt4guNz9 lQ3r4ET0TAPL/nJKHW4QPxF97aIdhgNF6UbwrUaUD3yXMZWLqlu6OtMt33Yst6hlJDhV XCVdZVAOus0Ccc/rsXIK3TjlBHHUj340Opv5Bst2/EVI26Ow7uF1WsUmCb8NShx8ar1J v5kJwdCXp1KAxDLB9SX+EH8NyHGYaLzb2amIlKtCFOSYR79dOBTAQENEN3JuMUxqk/nd oSVULubVc70fZ97RJsdxbFW0fwtRRbx+/vxUUwk3WVArjaFpTELTP1DuIRI7gT6VtoGL l/wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GRQUD6aNBCsNuqFAIG6AdR5vQ0WQ+2J7r8AyKiHiXVM=; b=fdJYhnD3BTmj7lm3wcC3gqtdgyS0wmEF1SEmrkv5kuVi+ZVAZeCWVHizhxdzHvNlUF Fjq9o9EnzkTf5TLNQdqPBCv2lne50iU2Sjukk0b2hnuQGRPqRb9wr+uYEEFWTdJ4glO1 5AnlpsU0twKQMBq7UE8L6cnKG+fGUwm8+gAkldWo83SgUIB9YAGh8OhZ/uCp7tNt9i93 bYvQAwnB2YDtcIKPxOZlCTtUU+diFDzg8lrUqxUTe0apZBcT0ejWCyYmBL1BC3fZnB3S DRLqbblkTvdCIa0+J/dP0CFvILrXg4oCmLrjOKo2hpVAXyp93dWCNCb8uFVTMjCV4cL7 Prrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qu1UtskE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020a05640240d600b0046f72e9db46si1150393edb.283.2022.12.22.08.27.52; Thu, 22 Dec 2022 08:28:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qu1UtskE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230409AbiLVQZq (ORCPT + 99 others); Thu, 22 Dec 2022 11:25:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbiLVQZo (ORCPT ); Thu, 22 Dec 2022 11:25:44 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1846AD4F; Thu, 22 Dec 2022 08:25:41 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AC91F61C27; Thu, 22 Dec 2022 16:25:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7036C433EF; Thu, 22 Dec 2022 16:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671726340; bh=vvag379xei9QKBc4aAnNJasBDyZYO68DL42DBe0lDsc=; h=From:To:Cc:Subject:Date:From; b=qu1UtskEppTnHBeXtbhhQ5uhSofJOfc6DUqdGx662zT9xlQ++X0InCVEmaUBAYOSC lApQL5trAFN/5MzFqU59Ax1RJrb/UUhDDUqZHKsCyIj5YE9olIGPEuTv1+lbfyn9os gHpccr7bwXvmNFPjmaJqjsTwiED7CThiqBmsj0sAuvymBFyA5YdOEbDOgV0BypNr0q b7r/BxdyR41Bm4vRN3316IQUQNMpWRUQE9pf6mbp0KQ9cbHGwl/482YYW+WXF7YoWy oYRdKXwz9REOuy+OulhNWMQ/1fKT1Dbgka9XhkYGPFSFXAMOsBs6CU8LYPHisMq38x 9WjB0c3Fx+Psw== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Subject: [PATCH 1/5] kbuild: refactor silent mode detection Date: Fri, 23 Dec 2022 01:25:31 +0900 Message-Id: <20221222162535.1578462-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752932282473915093?= X-GMAIL-MSGID: =?utf-8?q?1752932282473915093?= Factor out $(findstring s,...). Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Reviewed-by: Nicolas Schier --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 25247f931872..e8ce3e2b30d6 100644 --- a/Makefile +++ b/Makefile @@ -100,12 +100,12 @@ endif # make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS. ifeq ($(filter 3.%,$(MAKE_VERSION)),) -silence:=$(findstring s,$(firstword -$(MAKEFLAGS))) +short-opts := $(firstword -$(MAKEFLAGS)) else -silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS))) +short-opts := $(filter-out --%,$(MAKEFLAGS)) endif -ifeq ($(silence),s) +ifneq ($(findstring s,$(short-opts)),) quiet=silent_ KBUILD_VERBOSE = 0 endif From patchwork Thu Dec 22 16:25:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 35875 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp45729wrn; Thu, 22 Dec 2022 08:30:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXs18NQLCYlUwyHSGu44lHiYRh7qVjO+lU0UJHVu459a/wDG9DCR+v8rwMmvgqfpX3zcbcO2 X-Received: by 2002:a17:907:3888:b0:83f:757e:f182 with SMTP id sq8-20020a170907388800b0083f757ef182mr4876341ejc.65.1671726644615; Thu, 22 Dec 2022 08:30:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671726644; cv=none; d=google.com; s=arc-20160816; b=jo4VZbphK5erxSTP5OHsmjTPPTAD6HcAeygbHqGXup1kzzhB5MF3PtwEM3WxqpbbqA +mVGcsoGpIpxovIwW/vzASBoJpN9Mh4WGMYpasWoSUjX75BY6p1u5qJZS/FD5W4XJgSz zsCvBfTuzrOuRbH4nTlsQl3oETesbiFF5/bt589RPC/zom6HcL8au5tThFa/bPsq7eRw qL2AGqcUNTI/8aN2WduCUW0/EjozUFTyqA9pDplFXekNlkUspyVQ+LZsDtY5Dw1Nvgd2 /IPxCeWidVs1YyDnqMK8Tk++ifnTMjCvwvy8GeYv8ypWQCYR0vyWHj6J+w37SuGLf73b S7vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=89dBuBdfcOUp0QEPg5hnHFpICD7eaZ/dcGEqA07mDG4=; b=Se4GXVTnvhupLI6Bzt7kYOOHEe0lsTayVz62Md2d0n8blFsedsd4Le6qLnJXDFEuuG 0Y1iomn7EPaYKYj5ne0ornPidAmg/2yoRp4GtUUROakc29juNb0b80FIB2v2rYPIoBGJ Prof8duAx/ohoB1IuuNtJi4Revm0XMaxLZeS3NWBh4v84KW1QRZ/PLnrPO26/feAERU3 f0yGpP2CdZAaZb5hcZzDYtE3OkkdEjwXy4OKjZEXEQZrPXHdCHO6FmRbNdcjiO++DOZE sMtDD6ENGctj6POeLuxjkXdsqR274eVU6JmzPuchIVZLDlAQJ6Co8Oc+U5+X2zdkOI+o vLEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GnlPxbd2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sz15-20020a1709078b0f00b007be268708b3si668961ejc.926.2022.12.22.08.30.20; Thu, 22 Dec 2022 08:30:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GnlPxbd2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235217AbiLVQZs (ORCPT + 99 others); Thu, 22 Dec 2022 11:25:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231129AbiLVQZo (ORCPT ); Thu, 22 Dec 2022 11:25:44 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBCD5F5D; Thu, 22 Dec 2022 08:25:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 649AE61C77; Thu, 22 Dec 2022 16:25:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87544C433F1; Thu, 22 Dec 2022 16:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671726341; bh=zmw5dd2+nTjePoq18Ny9AwtSOVSb9PF/qBiIkTnKoys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GnlPxbd2rp+6nR5yFh3rtyqpu7uYWZWEs+DXV0eyjaf72X2L71y0Sz9fi3ea5YzVT mkk+1WJkRIOD1LHgj5mHTKBXqgTXt2X6TEaCCDLA1M6KuVAb5RWVIpTYPpOyya2gj5 Y95Fwtbzm5w3xlxYQM1GJFFiFs2IKqMsy1fwfmT3pHOSzpBxkWfGosvxdtqrMSvDtB INuWzjL4WalsV6VI0B8cEz6vPvOhhsKQWB4X226R136NSfa/lWo//uv+Pa0wdrRB/p 2ZI0g+jFKm3TAMNggoRJLy6SMumnpqIG+2soe+FsLhs/s89RVjpd0agcpZkOQaRJhN VmgKMgBEkeniQ== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Subject: [PATCH 2/5] kbuild: print short log in addition to the whole command with V=1 Date: Fri, 23 Dec 2022 01:25:32 +0900 Message-Id: <20221222162535.1578462-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221222162535.1578462-1-masahiroy@kernel.org> References: <20221222162535.1578462-1-masahiroy@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752932438053974306?= X-GMAIL-MSGID: =?utf-8?q?1752932438053974306?= "make V=1" prints the whole command instead of the short log, but I think it is nicer to print both so that you can easily spot the build rule of your interest. This commit changes V=1 to print the short log (the line starts with '#'), followed by the full log. In parallel builds, the short/full logs from the same build rule may be interspersed. To avoid it, please add -Otarget along with the -j option. Kbuild will never set -Otarget by default because Make would buffer the logs and lose the escape sequences. (Modern compilers print warnings and errors in color, but only when they write to a terminal.) This is also a preparation for supporting V=12 because V=2 appends the reason for rebuilding to the short log. Signed-off-by: Masahiro Yamada Tested-by: Nicolas Schier Reviewed-by: Nicolas Schier --- Makefile | 18 +++++++----------- scripts/Kbuild.include | 26 +++++++++++++------------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index e8ce3e2b30d6..ce98dfd8359a 100644 --- a/Makefile +++ b/Makefile @@ -56,22 +56,18 @@ unexport GREP_OPTIONS # Beautify output # --------------------------------------------------------------------------- # -# Normally, we echo the whole command before executing it. By making -# that echo $($(quiet)$(cmd)), we now have the possibility to set -# $(quiet) to choose other forms of output instead, e.g. +# Most of build commands in Kbuild start with "cmd_". You can optionally define +# "quiet_cmd_*". If defined, the short log is printed. Otherwise, no log from +# that command is printed by default. # -# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ -# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< -# -# If $(quiet) is empty, the whole command will be printed. -# If it is set to "quiet_", only the short version will be printed. -# If it is set to "silent_", nothing will be printed at all, since -# the variable $(silent_cmd_cc_o_c) doesn't exist. +# e.g.) +# quiet_cmd_depmod = DEPMOD $(MODLIB) +# cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE) # # A simple variant is to prefix commands with $(Q) - that's useful # for commands that shall be hidden in non-verbose mode. # -# $(Q)ln $@ :< +# $(Q)$(MAKE) $(build)=scripts/basic # # If KBUILD_VERBOSE equals 0 then the above command will be hidden. # If KBUILD_VERBOSE equals 1 then the above command is displayed. diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 2f7356b2990b..faae3c7986b0 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -125,15 +125,15 @@ dtbinst := -f $(srctree)/scripts/Makefile.dtbinst obj # $(Q)$(MAKE) $(clean)=dir clean := -f $(srctree)/scripts/Makefile.clean obj -# echo command. -# Short version is used, if $(quiet) equals `quiet_', otherwise full one. -echo-cmd = $(if $($(quiet)cmd_$(1)),\ - echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';) - -# sink stdout for 'make -s' - redirect := - quiet_redirect := -silent_redirect := exec >/dev/null; +# pring log +# +# If quiet is "silent_", print nothing and sink stdout +# If quiet is "quiet_", print short log +# If quiet is empty, print short log and whole command +silent_log_print = exec >/dev/null; + quiet_log_print = $(if $(quiet_cmd_$1), echo ' $(call escsq,$(quiet_cmd_$1)$(why))';) + log_print = echo '$(pound) $(call escsq,$(or $(quiet_cmd_$1),cmd_$1 $@))'; \ + echo ' $(call escsq,$(cmd_$1))'; # Delete the target on interruption # @@ -156,8 +156,8 @@ delete-on-interrupt = \ $(foreach sig, HUP INT QUIT TERM PIPE, \ trap 'rm -f $@; trap - $(sig); kill -s $(sig) $$$$' $(sig);)) -# printing commands -cmd = @set -e; $(echo-cmd) $($(quiet)redirect) $(delete-on-interrupt) $(cmd_$(1)) +# print and execute commands +cmd = @$(if $(cmd_$(1)),set -e; $($(quiet)log_print) $(delete-on-interrupt) $(cmd_$(1)),:) ### # if_changed - execute command if any prerequisite is newer than @@ -234,7 +234,7 @@ if_changed_rule = $(if $(if-changed-cond),$(rule_$(1)),@:) # (6) No dir/.target.cmd file and target not listed in $(targets) # This is a good hint that there is a bug in the kbuild file ifeq ($(KBUILD_VERBOSE),2) -why = \ +_why = \ $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ $(if $(wildcard $@), \ $(if $(newer-prereqs),- due to: $(newer-prereqs), \ @@ -251,7 +251,7 @@ why = \ ) \ ) -echo-why = $(call escsq, $(strip $(why))) +why = $(space)$(strip $(_why)) endif ############################################################################### From patchwork Thu Dec 22 16:25:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 35874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp44897wrn; Thu, 22 Dec 2022 08:29:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXsOawKnCee2iZ+0i9ymxx2O1+F938M5cqqkKo+entt3eVAOVtpkOcxuOqtx/xWz9t07s8kX X-Received: by 2002:a05:6402:2b89:b0:46c:aa8b:da5c with SMTP id fj9-20020a0564022b8900b0046caa8bda5cmr5386353edb.33.1671726540273; Thu, 22 Dec 2022 08:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671726540; cv=none; d=google.com; s=arc-20160816; b=uOtNkD+Se/X+RWLNYsCtAy2+kvYwOxLKcL+aT/iXiBXGqfZ3XhfFdjVolRggQiV1YG tP8V78VKWzbYpKyRVEO5NHPIc7dYHcK4QqVRqqcWbvkishHC9Q08J091DPfhJCXvq8It 0Gq0arByEV4SoG6OVkzfwFcRSFkrmKjFYCiOd4GYwIbP9RhfMCYq2+zd95IlZSNO+2SV KQ6pRniDWPWRXnfRH++H79mo6zMZZav1nIzzI7+rJsobJVKJAMisqYa9Fs1PE259I0/f /NROye7H4hC7uMYaTI5180+JJoV6Si6RXvs5Pkb5/5n5+oiAxiR7NzWjoeQcDuYmwbpb vR3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nx6WH5IehkAPFhdOkkvL7euUv54MHV0nprljnkyuXVQ=; b=a2S4UmboIwY9LS2EsjtdohK01SFBz40ZWM9CzHXGLcQF5gS/4tz+ibRXmf6EIRn8zx EY6cFWYg7xeq1Gdr16XqB7/OaWLL/oUGrL4yvUKJ5d3fEEERgmdGu7CQZv+MbQjTMyGo 9chDfeaTr//sG6Qh8ihtjknLEJq2sqv3O2sidQRpx21pv7YAec4AQpG0zoPWCWBbrV1L gVGoECKiALqEldbTJD65yhR+Py1fR/x+hWp/xvU+um5OaMIQnBxSk8nMptMYbTAX9U9o ZYQa1RZoVZ1SXghbex18k7ueU17ya0hPTeeOEJ8aH7AUJjx33dpaek3B2ym3ivMg9UoB YPdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aBvV5hjg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020a0564021f0200b0046db48205e6si933890edb.77.2022.12.22.08.28.37; Thu, 22 Dec 2022 08:29:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aBvV5hjg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229670AbiLVQZy (ORCPT + 99 others); Thu, 22 Dec 2022 11:25:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235285AbiLVQZt (ORCPT ); Thu, 22 Dec 2022 11:25:49 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC0F3BE2A; Thu, 22 Dec 2022 08:25:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 96262B803F2; Thu, 22 Dec 2022 16:25:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61422C433EF; Thu, 22 Dec 2022 16:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671726345; bh=I1QQ3wj0EZ2LVmZ8RlrxP6BvTX3HOQCzJhPb1JK3S5Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aBvV5hjgmYtdnsRh/a6xDn8u4JdX5WJaAgikE/hwoGibLaiBICdjG89ctJI1/f8bi ep42tSDdAVcnj6ahLM8Kpf9reEuhobVNB2PxBNIqGbrVZRa+GSAKcZOU4jygQL9m4x XKaFPvG/r7anSl75C0i8wWTg6CvZSJyFfdK5AoTKDh70xsZjc2wh/ZvY30x2QxklEI 8bbmSrhXUa2KMOUDOdIKHPjxk4byrn1GiOx22dhx6kDKOxEl8q2jbpJHppy5VDYF4j lCD/S2QHGr9+Ih7rzONuTUaGO7KYxYCWsd3TeJgcFaV2yJTK6wT62N8lpgH4JR5r/o YclT7GIzx1o0g== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Christophe Leroy , David Howells , David Woodhouse , Jonathan Corbet , Liam Howlett , Michael Ellerman , Nicholas Piggin , Zeng Heng , keyrings@vger.kernel.org, linux-doc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 3/5] kbuild: do not print extra logs for V=2 Date: Fri, 23 Dec 2022 01:25:33 +0900 Message-Id: <20221222162535.1578462-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221222162535.1578462-1-masahiroy@kernel.org> References: <20221222162535.1578462-1-masahiroy@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752932328280412127?= X-GMAIL-MSGID: =?utf-8?q?1752932328280412127?= Some scripts increase the verbose level when V=1, but others when not V=0. I think the former is correct because V=2 is not a log level but a switch to print the reason for rebuilding. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- Documentation/Makefile | 2 +- arch/powerpc/kernel/prom_init_check.sh | 9 ++++----- certs/extract-cert.c | 9 ++++++--- scripts/asn1_compiler.c | 4 ++-- scripts/kernel-doc | 4 ++-- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index bb73dcb5ed05..023fa658a0a8 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -28,7 +28,7 @@ BUILDDIR = $(obj)/output PDFLATEX = xelatex LATEXOPTS = -interaction=batchmode -no-shell-escape -ifeq ($(KBUILD_VERBOSE),0) +ifeq ($(findstring 1, $(KBUILD_VERBOSE)),) SPHINXOPTS += "-q" endif diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh index 311890d71c4c..5a319863f289 100644 --- a/arch/powerpc/kernel/prom_init_check.sh +++ b/arch/powerpc/kernel/prom_init_check.sh @@ -51,11 +51,10 @@ do # a leading . on the name, so strip it off here. UNDEF="${UNDEF#.}" - if [ $KBUILD_VERBOSE ]; then - if [ $KBUILD_VERBOSE -ne 0 ]; then - echo "Checking prom_init.o symbol '$UNDEF'" - fi - fi + case "$KBUILD_VERBOSE" in + *1*) + echo "Checking prom_init.o symbol '$UNDEF'" ;; + esac OK=0 for WHITE in $WHITELIST diff --git a/certs/extract-cert.c b/certs/extract-cert.c index 8c1fb9a70d66..d3a0ff2867c0 100644 --- a/certs/extract-cert.c +++ b/certs/extract-cert.c @@ -78,7 +78,7 @@ static void drain_openssl_errors(void) static const char *key_pass; static BIO *wb; static char *cert_dst; -static int kbuild_verbose; +static bool verbose; static void write_cert(X509 *x509) { @@ -90,19 +90,22 @@ static void write_cert(X509 *x509) } X509_NAME_oneline(X509_get_subject_name(x509), buf, sizeof(buf)); ERR(!i2d_X509_bio(wb, x509), "%s", cert_dst); - if (kbuild_verbose) + if (verbose) fprintf(stderr, "Extracted cert: %s\n", buf); } int main(int argc, char **argv) { char *cert_src; + char *kbuild_verbose; OpenSSL_add_all_algorithms(); ERR_load_crypto_strings(); ERR_clear_error(); - kbuild_verbose = atoi(getenv("KBUILD_VERBOSE")?:"0"); + kbuild_verbose = getenv("KBUILD_VERBOSE"); + if (kbuild_verbose && strchr(kbuild_verbose, '1')) + verbose = true; key_pass = getenv("KBUILD_SIGN_PIN"); diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c index 71d4a7c87900..7b6756a8c15d 100644 --- a/scripts/asn1_compiler.c +++ b/scripts/asn1_compiler.c @@ -567,8 +567,8 @@ int main(int argc, char **argv) int fd; kbuild_verbose = getenv("KBUILD_VERBOSE"); - if (kbuild_verbose) - verbose_opt = atoi(kbuild_verbose); + if (kbuild_verbose && strchr(kbuild_verbose, '1')) + verbose_opt = true; while (argc > 4) { if (strcmp(argv[1], "-v") == 0) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 54b0893cae66..8ad0a7d68d9a 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -175,8 +175,8 @@ my $declaration_start_line; my ($type, $declaration_name, $return_type); my ($newsection, $newcontents, $prototype, $brcount, %source_map); -if (defined($ENV{'KBUILD_VERBOSE'})) { - $verbose = "$ENV{'KBUILD_VERBOSE'}"; +if (defined($ENV{'KBUILD_VERBOSE'}) && $ENV{'KBUILD_VERBOSE'} =~ '1') { + $verbose = 1; } if (defined($ENV{'KCFLAGS'})) { From patchwork Thu Dec 22 16:25:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 35876 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp45972wrn; Thu, 22 Dec 2022 08:31:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXuIfEHyUD49dTdelWPffa+VywwTr+6eHTbZQVHPgjUqRuXsr6zrsoOgHe/RKBL6Z7qsF59g X-Received: by 2002:a17:907:a782:b0:7c1:6430:e5d0 with SMTP id vx2-20020a170907a78200b007c16430e5d0mr5219706ejc.4.1671726666550; Thu, 22 Dec 2022 08:31:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671726666; cv=none; d=google.com; s=arc-20160816; b=OiVabEsAowskqH/ruMAWPk9FKT5KEdDwR9ENPtNwB6y/vuOC4GhyPNDfPH7WAISCR+ sNMHCjaKfkhvmklAVqac5LJZNbf0MrHRubseZmGyENqu6F4nSvUgzmXI0QcfSDhcYo2r OhR9J6jD1mwGU83YQgM2SApp1S3A7Q8YB/HNFI1939s1wO6AhLFr/4T19BysU4z1ybvG XI1nUhKArHdMVWwKpBvpe7gtEIYFe7mRDVQ8gA4/7rHN4H52SCRv0NvV620KD23GgW0k RYfN2rHSHuuMDq9eCDBooL70MTS1QRnqM81+pr7ouBOTma8gl0q5e4KyC3e7fqqghpCz uUTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ITP9+ZjXWSApSD81QMLof9Aznvl0ySpwQ8ZBo7EwKh0=; b=z9eY90K2PU60S2Slt+3//TFcfxNLkNtD3q7uqc6kBkiJB1bTe78n4s6mZ/8HkHMxQL pSYpeMOQhkp5p+Y/+i4bCmUCbvcFn2dHubPfAEZFtueGxMTcs9MLHScaGGK3JYjGqxQM zFrNRLAlaKMgJPUIyV8VPqaSV0KPSPinDZpjwRrJG9NEpJLg1hUm9rMfiJZKgTcEQllV bd4DS7hoDa43JA05I/Mx92EypWQaqZ+LNtof0KnXc1TVaY+5QLNYEyQ0d+PdMUP266om gDj07BPjNdeY+6HI36x56THMFbfmc8CkgQCv2QEan7DXYu7bZ5kdtXPod0OhkkjxdWD5 5o/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I2KLf4OX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t18-20020a1709063e5200b007add0c2ee2csi599913eji.924.2022.12.22.08.30.42; Thu, 22 Dec 2022 08:31:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I2KLf4OX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235394AbiLVQZ7 (ORCPT + 99 others); Thu, 22 Dec 2022 11:25:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235310AbiLVQZv (ORCPT ); Thu, 22 Dec 2022 11:25:51 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52B85248E9; Thu, 22 Dec 2022 08:25:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 789BF61C27; Thu, 22 Dec 2022 16:25:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDD17C433F1; Thu, 22 Dec 2022 16:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671726348; bh=GvfDctaGNc7i2KzNMI69jvMZBKWAND366R+TzK2H2YU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I2KLf4OXmjVVPJMPAuwOAsnB5ms/iSEINkvPQrnoRBc/+D2l1u8ctvE6WaBu0jD0Z ZJzJFfH1avicNkqWN03tJbvs32HIgCyuQEgGbcyvUFQufIKfH3nOw2yyI78noAUFHQ jQsOze9t/2MLAVhTSo71xAtX4XV0o9NiU2NV1J6CkOagTF1D6UMiiDkfRTo0ZsPuSv l90EoKhdVtugYpwsLVV2Zj6418x8VUo0i1zHUCHOCY75YC+6Vx9crV2FxuJc5zAPw4 EcjZtXDkpTeMmdLmXESRNfFPRDE62yQ3h9n0oTYPror8n8KGlqjVo6IrZn7ErQIWAg 1+mzvTdprzeog== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Borislav Petkov , Cristian Ciocaltea , Dave Hansen , Greg Kroah-Hartman , "H. Peter Anvin" , Ingo Molnar , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Thomas Gleixner , Vipin Sharma , x86@kernel.org Subject: [PATCH 4/5] kbuild: allow to combine multiple V= levels Date: Fri, 23 Dec 2022 01:25:34 +0900 Message-Id: <20221222162535.1578462-4-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221222162535.1578462-1-masahiroy@kernel.org> References: <20221222162535.1578462-1-masahiroy@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752932460957064229?= X-GMAIL-MSGID: =?utf-8?q?1752932460957064229?= Commit a6de553da01c ("kbuild: Allow to combine multiple W= levels") supported W=123 to enable all the extra warning groups. I think a similar idea is applicable to the V= option. V=1 echos the whole command V=2 prints the reason for rebuilding These are orthogonal, and can be enabled at the same time. This commit supports V=12 to enable both of them. Signed-off-by: Masahiro Yamada Tested-by: Nicolas Schier Reviewed-by: Nicolas Schier --- Makefile | 18 +++++++++--------- arch/x86/tools/Makefile | 2 +- scripts/Kbuild.include | 4 ++-- scripts/tags.sh | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index ce98dfd8359a..bd69bf73a256 100644 --- a/Makefile +++ b/Makefile @@ -69,9 +69,8 @@ unexport GREP_OPTIONS # # $(Q)$(MAKE) $(build)=scripts/basic # -# If KBUILD_VERBOSE equals 0 then the above command will be hidden. -# If KBUILD_VERBOSE equals 1 then the above command is displayed. -# If KBUILD_VERBOSE equals 2 then give the reason why each target is rebuilt. +# If KBUILD_VERBOSE contains 1, the whole command is echoed. +# If KBUILD_VERBOSE contains 2, the reason for rebuilding is printed. # # To put more focus on warnings, be less verbose as default # Use 'make V=1' to see the full commands @@ -83,12 +82,12 @@ ifndef KBUILD_VERBOSE KBUILD_VERBOSE = 0 endif -ifeq ($(KBUILD_VERBOSE),1) +quiet = quiet_ +Q = @ + +ifneq ($(findstring 1, $(KBUILD_VERBOSE)),) quiet = Q = -else - quiet=quiet_ - Q = @ endif # If the user is running make -s (silent mode), suppress echoing of @@ -1762,8 +1761,9 @@ help: printf " %-16s - Show all of the above\\n" help-boards; \ echo '') - @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' - @echo ' make V=2 [targets] 2 => give reason for rebuild of target' + @echo ' make V=n [targets] 0: quiet build (default), 1: verbose build' + @echo ' 2: give reason for rebuild of target' + @echo ' V=1 and V=2 can be combined with V=12' @echo ' make O=dir [targets] Locate all output files in "dir", including .config' @echo ' make C=1 [targets] Check re-compiled c source with $$CHECK' @echo ' (sparse by default)' diff --git a/arch/x86/tools/Makefile b/arch/x86/tools/Makefile index bddfc9a46645..90e820ac9771 100644 --- a/arch/x86/tools/Makefile +++ b/arch/x86/tools/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 PHONY += posttest -ifeq ($(KBUILD_VERBOSE),1) +ifneq ($(findstring 1, $(KBUILD_VERBOSE)),) posttest_verbose = -v else posttest_verbose = diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index faae3c7986b0..10cf8d2d82ef 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -132,7 +132,7 @@ clean := -f $(srctree)/scripts/Makefile.clean obj # If quiet is empty, print short log and whole command silent_log_print = exec >/dev/null; quiet_log_print = $(if $(quiet_cmd_$1), echo ' $(call escsq,$(quiet_cmd_$1)$(why))';) - log_print = echo '$(pound) $(call escsq,$(or $(quiet_cmd_$1),cmd_$1 $@))'; \ + log_print = echo '$(pound) $(call escsq,$(or $(quiet_cmd_$1),cmd_$1 $@)$(why))'; \ echo ' $(call escsq,$(cmd_$1))'; # Delete the target on interruption @@ -233,7 +233,7 @@ if_changed_rule = $(if $(if-changed-cond),$(rule_$(1)),@:) # (5) No dir/.target.cmd file (used to store command line) # (6) No dir/.target.cmd file and target not listed in $(targets) # This is a good hint that there is a bug in the kbuild file -ifeq ($(KBUILD_VERBOSE),2) +ifneq ($(findstring 2, $(KBUILD_VERBOSE)),) _why = \ $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ $(if $(wildcard $@), \ diff --git a/scripts/tags.sh b/scripts/tags.sh index e137cf15aae9..2e756bee1fa9 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -8,7 +8,7 @@ # Uses the following environment variables: # SUBARCH, SRCARCH, srctree -if [ "$KBUILD_VERBOSE" = "1" ]; then +if [[ "$KBUILD_VERBOSE" =~ 1 ]]; then set -x fi From patchwork Thu Dec 22 16:25:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 35877 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp46061wrn; Thu, 22 Dec 2022 08:31:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXvnzu16yV1ev+K6HAQ3SxQhrIIoMlzzldKvidX5j1tVKbHgZb0e7axJbymbKXeAdZu2yCm4 X-Received: by 2002:a17:907:d388:b0:846:cdd9:d29 with SMTP id vh8-20020a170907d38800b00846cdd90d29mr1273766ejc.28.1671726675773; Thu, 22 Dec 2022 08:31:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671726675; cv=none; d=google.com; s=arc-20160816; b=ZIQEb/1ATuL/Z/MMoFwkm670AqyFwtjoF2ChpEqt2afyRP72TdspoHe86rIxUD+2hy TyonQmU9ewn5jHW/P0l03bwRXu7hvQw7KOVRZXc8Ynr8wcv7Q6RsK8qnr3li5gTJZleK TO4jSFfjxUiP3GaZg8o5rkSN0pNJUHIhaOzI16WLfbOJb/Zk+6wZT0nzwh8QUPMFqHzE AF7ABvnrHr3P/CnA6KXZa1pe3tf1tJjbtFBSTO+KVeX14AwGm/EZd8mGYxeRSrpZDbQE tPs5Q+2/ojnvKVOkmWRq22EuEnOvQ0xgj9h3zHKDK1Vs6fcDUkE/W6Qr5nK4jxN/FDVL 9uFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Cc5jYwsvrxDT4M+HHi+n4YGC2/kog70U4D6wAwZCRUc=; b=GQaHuXKj7uRWdWnTVBVNSldtHLmpAEIjhVcgZJBeZh49gtsipp9xak8cw63e6j8Xn7 VK1GbiymQZSWrpOwQrl5i0opnvpkIejC2C98T1ntamDmxfnKntGc75wPjOO3yrpwbsg3 DihrVSiigSAz2KaoB/6iwTNayNEZpH9NUOXBiM8A7+s75KcjGL/UqEEfacN4IxYXRyHm DIFU00GiZ1e7+wvKFJnH2U+X1CHIG2VSSEzmfNtn2C9Gy9waMX+uMacwRR19GlwZFVvW woOjYC5EneXYjfNAHCLAd7RZNNfPBoHjJo3QgoYGOZ+SIkiFD9cTMYRPZOi5XBw3L19i 9aFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VJ2BDphH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ww6-20020a170907084600b007c1946d08b3si584163ejb.989.2022.12.22.08.30.52; Thu, 22 Dec 2022 08:31:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VJ2BDphH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229525AbiLVQ0H (ORCPT + 99 others); Thu, 22 Dec 2022 11:26:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235285AbiLVQZ4 (ORCPT ); Thu, 22 Dec 2022 11:25:56 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5A5A26483; Thu, 22 Dec 2022 08:25:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E461961C77; Thu, 22 Dec 2022 16:25:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 713BEC433D2; Thu, 22 Dec 2022 16:25:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671726351; bh=zg5ZJ/EbLX+RoxMOBFp+SM0c2VmypEvqfO24sgs0ND8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VJ2BDphH6cGrLtbzGnYPbm37UBM2wisB026VX3/LtrACdusis4wlETid6Fo7voOdL 07zm0jgqVVWrukJSZdcqihQavTUKhquqq3nVy1XzWqkto+hg0XcFhLT9XbqVLj/tcI 7mE0CBasXzONnoAtWdBnWPMXh3+zHB4Qpz1dfKPTcEvSvmsWpNBXDG1jOgt1Avf+qd AVNxi2/quR3aqMQNPJjp6em4uC4BWpNRVGccmYlLZHLrYmUqCH1076l3AgS+BfHZmy Kj3nZHmaMy7C3vzz3NFk7prIzH2mON28giy3yOFb/42pvYKXi8QjVQNQOx8ro77ux/ S/u4ZSlTwv5ww== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Jonathan Corbet , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-doc@vger.kernel.org Subject: [PATCH 5/5] kbuild: drop V=0 support Date: Fri, 23 Dec 2022 01:25:35 +0900 Message-Id: <20221222162535.1578462-5-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221222162535.1578462-1-masahiroy@kernel.org> References: <20221222162535.1578462-1-masahiroy@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752932470547671949?= X-GMAIL-MSGID: =?utf-8?q?1752932470547671949?= The top Makefile sets KBUILD_VERBOSE to 0 by default, it looks weird now because V=1 and V=2 can be OR'ed as V=12. The default should be empty. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- Documentation/kbuild/makefiles.rst | 4 ++-- Makefile | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst index 6b7368d1f516..59085ffbe99a 100644 --- a/Documentation/kbuild/makefiles.rst +++ b/Documentation/kbuild/makefiles.rst @@ -523,7 +523,7 @@ more details, with real examples. $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ @$(kecho) ' Kernel: $(boot)/$@ is ready' - When kbuild is executing with KBUILD_VERBOSE=0, then only a shorthand + When kbuild is executing with KBUILD_VERBOSE unset, then only a shorthand of a command is normally displayed. To enable this behaviour for custom commands kbuild requires two variables to be set:: @@ -544,7 +544,7 @@ more details, with real examples. GEN lib/crc32table.h - will be displayed with "make KBUILD_VERBOSE=0". + will be displayed with "make KBUILD_VERBOSE=". 3.12 Command change detection ----------------------------- diff --git a/Makefile b/Makefile index bd69bf73a256..99cb8c9de53a 100644 --- a/Makefile +++ b/Makefile @@ -78,9 +78,6 @@ unexport GREP_OPTIONS ifeq ("$(origin V)", "command line") KBUILD_VERBOSE = $(V) endif -ifndef KBUILD_VERBOSE - KBUILD_VERBOSE = 0 -endif quiet = quiet_ Q = @ @@ -102,7 +99,7 @@ endif ifneq ($(findstring s,$(short-opts)),) quiet=silent_ -KBUILD_VERBOSE = 0 +override KBUILD_VERBOSE := endif export quiet Q KBUILD_VERBOSE @@ -1761,7 +1758,7 @@ help: printf " %-16s - Show all of the above\\n" help-boards; \ echo '') - @echo ' make V=n [targets] 0: quiet build (default), 1: verbose build' + @echo ' make V=n [targets] 1: verbose build' @echo ' 2: give reason for rebuild of target' @echo ' V=1 and V=2 can be combined with V=12' @echo ' make O=dir [targets] Locate all output files in "dir", including .config'