Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1172058rwl; Fri, 7 Apr 2023 11:02:05 -0700 (PDT) X-Google-Smtp-Source: AKy350Zi6UFHvtsDQ8MJzxmVNvNp/KUojltHucmkK1T5t3Wgs5LfFoDFlEsV8+hUx9u54YRdx0xR X-Received: by 2002:a17:907:270b:b0:933:4184:f0d7 with SMTP id w11-20020a170907270b00b009334184f0d7mr233672ejk.69.1680890524889; Fri, 07 Apr 2023 11:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680890524; cv=none; d=google.com; s=arc-20160816; b=sGXpAqviJoSzDKJluBSME3v9ozvcauArc5FZ7OOvneoJ0/M/ipbj8g0peitPmHikt2 UGG10qnrhc/DIPsdLqwh+TqyVksJR0jQyiNKI35/fPwB0DVbUl+9l80hxuDw6GTL4htc BUwSBb0Vg1cUCHzdrm2o423qp3wDxPHIVBwjtdfutxFFWaq+GxLRSKHtGkICn1TcFIu0 lY2BanpifcTFNTJuZ9pNH8Zqn/XpE2UMFqe7Sgn8Rka1BGrpnj++D7Vy2MqQKchGnU9o Wk+9gtp6MWqFRV62By8uAwzFPvx4Z7B9YD5dyCQEGIxO3d4bWjZmVe5G5dBjPaBq2Tym /LHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CAHaDO9qzNtHV0LyeKVB/f7YJto5JQ5HW3sLOf6zBaU=; b=HL7HSif5CDZG1e4gRUdPpUC2i1SyPwshznofEI9X1J2KEDIUyReQYblr4mKX2mDu3u xKHfpoaa5Elp8F8J6IntN94kiueSJA70ExiaIoROtMqJlYEgcpATFUM0jYUwRVw0DeAV Bv255G3pIj78Mh1CB3Pp/nE5I4ZQSTjBXuyxgEm8O4Dh5wnlktUTihcQkcngNzjT9min TH6zS/LCk0HG8M8OUJ6x+7B5T10HrAsOORPIzpxdae7KPQdaPmtyU0dv7AueNpb+MMo3 fkNfkANH8L4WgvD3CTZd2M0gaGJmaDEq2jTb6yJsOcv2q96Dn939jQgE+ZLdVcgYThGA xBkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hdB8NQ0v; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a17090636ce00b0092fd9e735d6si327347ejc.314.2023.04.07.11.01.36; Fri, 07 Apr 2023 11:02:04 -0700 (PDT) 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=hdB8NQ0v; 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 S231326AbjDGSAv (ORCPT + 99 others); Fri, 7 Apr 2023 14:00:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231303AbjDGSAs (ORCPT ); Fri, 7 Apr 2023 14:00:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 880C8AF0D; Fri, 7 Apr 2023 11:00:41 -0700 (PDT) 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 2346C611F2; Fri, 7 Apr 2023 18:00:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36645C433D2; Fri, 7 Apr 2023 18:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680890440; bh=i0oEMy2DxwTYLK52sMMBZD09NEUManBUj+WPu18WnMI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hdB8NQ0vg5aGsWS9837iR8Kl8onPriiSEQEuhat5qym8UICpNuN5c28wGRCwmS5NL XL2k10/wrfPNGb0WwJZ2mnhM8uObvcsaFfvi4bfKIHlKczlE8lp+Kc6pQeXlUX9R/k p3DokyxbssHZt6GjV8+DegRAcxAjD/nXWgMucoCPOuAV0ZF2Wg9dqR63m0Rh1uOsB1 NIHMLR3NqDVx2EPhNDBT2JLr4+lEhA+grxZeDIt9gi34tR3IM3LUNrjcWNJfXVCymH 3+fgbFc0lvMkbwEvgpskwMX/Y7EqeD2ecrJ1/uGLd0Hg5aYHyrwRtZMhuZ68hQVaqu +0jVEUmcR4G1A== Date: Fri, 7 Apr 2023 11:00:38 -0700 From: Nathan Chancellor To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Nicolas Schier Subject: Re: [PATCH 1/3] kbuild: merge cmd_archive_linux and cmd_archive_perf Message-ID: <20230407180038.GB1018455@dev-arch.thelio-3990X> References: <20230407101629.1298051-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230407101629.1298051-1-masahiroy@kernel.org> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 On Fri, Apr 07, 2023 at 07:16:27PM +0900, Masahiro Yamada wrote: > The two commands, cmd_archive_linux and cmd_archive_perf, are similar. > Merge them to make it easier to add more changes to the git-archive > command. > > Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor > --- > > scripts/Makefile.package | 19 +++++++++---------- > 1 file changed, 9 insertions(+), 10 deletions(-) > > diff --git a/scripts/Makefile.package b/scripts/Makefile.package > index 61f72eb8d9be..a205617730c6 100644 > --- a/scripts/Makefile.package > +++ b/scripts/Makefile.package > @@ -57,16 +57,17 @@ check-git: > false; \ > fi > > +quiet_cmd_archive = ARCHIVE $@ > + cmd_archive = git -C $(srctree) archive \ > + --output=$$(realpath $@) --prefix=$(basename $@)/ $(archive-args) > + > # Linux source tarball > # --------------------------------------------------------------------------- > > -quiet_cmd_archive_linux = ARCHIVE $@ > - cmd_archive_linux = \ > - git -C $(srctree) archive --output=$$(realpath $@) --prefix=$(basename $@)/ $$(cat $<) > - > targets += linux.tar > +linux.tar: archive-args = $$(cat $<) > linux.tar: .tmp_HEAD FORCE > - $(call if_changed,archive_linux) > + $(call if_changed,archive) > > # rpm-pkg > # --------------------------------------------------------------------------- > @@ -180,16 +181,14 @@ quiet_cmd_perf_version_file = GEN $@ > .tmp_perf/PERF-VERSION-FILE: .tmp_HEAD $(srctree)/tools/perf/util/PERF-VERSION-GEN | .tmp_perf > $(call cmd,perf_version_file) > > -quiet_cmd_archive_perf = ARCHIVE $@ > - cmd_archive_perf = \ > - git -C $(srctree) archive --output=$$(realpath $@) --prefix=$(basename $@)/ \ > - --add-file=$$(realpath $(word 2, $^)) \ > +perf-archive-args = --add-file=$$(realpath $(word 2, $^)) \ > --add-file=$$(realpath $(word 3, $^)) \ > $$(cat $(word 2, $^))^{tree} $$(cat $<) > > targets += perf-$(KERNELVERSION).tar > +perf-$(KERNELVERSION).tar: archive-args = $(perf-archive-args) > perf-$(KERNELVERSION).tar: tools/perf/MANIFEST .tmp_perf/HEAD .tmp_perf/PERF-VERSION-FILE FORCE > - $(call if_changed,archive_perf) > + $(call if_changed,archive) > > PHONY += perf-tar-src-pkg > perf-tar-src-pkg: perf-$(KERNELVERSION).tar > -- > 2.37.2 >