All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nick Desaulniers <ndesaulniers@google.com>,
	Nicolas Schier <nicolas@fjasle.eu>
Subject: Re: [PATCH 1/3] kbuild: merge cmd_archive_linux and cmd_archive_perf
Date: Fri, 7 Apr 2023 11:00:38 -0700	[thread overview]
Message-ID: <20230407180038.GB1018455@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20230407101629.1298051-1-masahiroy@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 <masahiroy@kernel.org>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> 
>  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
> 

      parent reply	other threads:[~2023-04-07 18:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-07 10:16 [PATCH 1/3] kbuild: merge cmd_archive_linux and cmd_archive_perf Masahiro Yamada
2023-04-07 10:16 ` [PATCH 2/3] kbuild: do not create intermediate *.tar for source tarballs Masahiro Yamada
2023-04-07 18:11   ` Nathan Chancellor
2023-04-08  1:32     ` Masahiro Yamada
2023-04-07 10:16 ` [PATCH 3/3] kbuild: do not create intermediate *.tar for tar packages Masahiro Yamada
2023-04-07 18:12   ` Nathan Chancellor
2023-04-20  8:54     ` Tariq Toukan
2023-04-20  9:06       ` Nicolas Schier
2023-04-20  9:19         ` Leon Romanovsky
2023-04-20 12:31           ` Masahiro Yamada
2023-04-11  0:33   ` Masahiro Yamada
2023-04-07 18:00 ` Nathan Chancellor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230407180038.GB1018455@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.