kbuild: do not create intermediate *.tar for tar packages

Commit 05e96e96a3 ("kbuild: use git-archive for source package
creation") split the compression as a separate step to factor out
the common build rules.

With the previous commit, we got back to the situation where source
tarballs are compressed on-the-fly.
There is no reason to keep the separate compression rules.

Generate the comressed tar packages directly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
Masahiro Yamada 2023-04-07 19:16:29 +09:00
parent f8d94c4e40
commit 3c65a2704c

View File

@ -27,21 +27,6 @@ fi ; \
tar -I $(KGZIP) -c $(RCS_TAR_IGNORE) -f $(2).tar.gz \
--transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3)
# tarball compression
# ---------------------------------------------------------------------------
%.tar.gz: %.tar
$(call cmd,gzip)
%.tar.bz2: %.tar
$(call cmd,bzip2)
%.tar.xz: %.tar
$(call cmd,xzmisc)
%.tar.zst: %.tar
$(call cmd,zstd)
# Git
# ---------------------------------------------------------------------------
@ -154,10 +139,17 @@ tar-install: FORCE
$(Q)$(MAKE) -f $(srctree)/Makefile
+$(Q)$(srctree)/scripts/package/buildtar $@
quiet_cmd_tar = TAR $@
cmd_tar = cd $<; tar cf ../$@ --owner=root --group=root --sort=name *
compress-tar.gz = -I "$(KGZIP)"
compress-tar.bz2 = -I "$(KBZIP2)"
compress-tar.xz = -I "$(XZ)"
compress-tar.zst = -I "$(ZSTD)"
linux-$(KERNELRELEASE)-$(ARCH).tar: tar-install
quiet_cmd_tar = TAR $@
cmd_tar = cd $<; tar cf ../$@ $(compress-tar$(suffix $@)) --owner=root --group=root --sort=name *
dir-tarballs := $(addprefix linux-$(KERNELRELEASE)-$(ARCH), .tar .tar.gz .tar.bz2 .tar.xz .tar.zst)
$(dir-tarballs): tar-install
$(call cmd,tar)
PHONY += dir-pkg