Commit 3c65a270 authored by Masahiro Yamada's avatar Masahiro Yamada

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

Commit 05e96e96 ("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: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
parent f8d94c4e
...@@ -27,21 +27,6 @@ fi ; \ ...@@ -27,21 +27,6 @@ fi ; \
tar -I $(KGZIP) -c $(RCS_TAR_IGNORE) -f $(2).tar.gz \ tar -I $(KGZIP) -c $(RCS_TAR_IGNORE) -f $(2).tar.gz \
--transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3) --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 # Git
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -154,10 +139,17 @@ tar-install: FORCE ...@@ -154,10 +139,17 @@ tar-install: FORCE
$(Q)$(MAKE) -f $(srctree)/Makefile $(Q)$(MAKE) -f $(srctree)/Makefile
+$(Q)$(srctree)/scripts/package/buildtar $@ +$(Q)$(srctree)/scripts/package/buildtar $@
compress-tar.gz = -I "$(KGZIP)"
compress-tar.bz2 = -I "$(KBZIP2)"
compress-tar.xz = -I "$(XZ)"
compress-tar.zst = -I "$(ZSTD)"
quiet_cmd_tar = TAR $@ quiet_cmd_tar = TAR $@
cmd_tar = cd $<; tar cf ../$@ --owner=root --group=root --sort=name * 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)
linux-$(KERNELRELEASE)-$(ARCH).tar: tar-install $(dir-tarballs): tar-install
$(call cmd,tar) $(call cmd,tar)
PHONY += dir-pkg PHONY += dir-pkg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment