From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbcJJNdJ (ORCPT ); Mon, 10 Oct 2016 09:33:09 -0400 Received: from smtprelay0221.hostedemail.com ([216.40.44.221]:36813 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752047AbcJJNcA (ORCPT ); Mon, 10 Oct 2016 09:32:00 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:541:599:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:5007:7903:9163:10004:10400:10848:11232:11658:11914:12043:12740:12760:13069:13311:13357:13439:14181:14659:14721:21080:21324:21325:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:5,LUA_SUMMARY:none X-HE-Tag: fight12_2e1cdefc3b439 X-Filterd-Recvd-Size: 2548 Message-ID: <1476106315.2856.24.camel@perches.com> Subject: Re: [PATCH] kbuild: honor '-s' option for tools/* From: Joe Perches To: Arnd Bergmann , Michal Marek Cc: Josh Poimboeuf , Arnaldo Carvalho de Melo , Masahiro Yamada , Jiri Olsa , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 10 Oct 2016 06:31:55 -0700 In-Reply-To: <20161010123812.1425903-1-arnd@arndb.de> References: <20161010123812.1425903-1-arnd@arndb.de> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.0-2ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2016-10-10 at 14:36 +0200, Arnd Bergmann wrote: > This changes all three of the above to behave just like Kbuild does, > and print no output with 'make -s' regardless of the version of that > tool, but otherwise behaves as before. In case of > tools/scripts/Makefile.include, I decided to use an identical > conditional block to set the $(quiet) variable for consistency, > even though it is not used in the same way. trivial notes: > diff --git a/Makefile b/Makefile [] > @@ -1612,11 +1612,12 @@ image_name: > # Clear a bunch of variables before executing the submake > tools/: FORCE > $(Q)mkdir -p $(objtree)/tools > - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ > + echo MAKEFLAGS=\""$(MAKEFLAGS)"\" > + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(findstring s,$(firstword -$(MAKEFLAGS))) $(filter --j% -j -s,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ Perhaps this is complicated enough to warrant some additional comments. > diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build [] > @@ -19,6 +19,16 @@ else > Q=@ > endif > > +ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 > +ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) > + quiet=silent_ > +endif > +else # make-3.8x > +ifneq ($(filter s% -s%,$(MAKEFLAGS)),) > + quiet=silent_ > +endif > +endif And perhaps the tests should be reversed for make version 3 so when make version 5 comes out and it likely has the same behavior as version 4, this doesn't need rewrite.