summaryrefslogtreecommitdiff
path: root/scripts/Makefile.package
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-04-07 19:16:29 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2023-04-16 17:38:41 +0900
commit3c65a2704cdd2a0cd0766352e587bae4a6268155 (patch)
tree00e317cd1efc79a9a9ac06ecb2377024f15f524c /scripts/Makefile.package
parentf8d94c4e403c89ec6b09ba69f65e4547ba99dd07 (diff)
kbuild: do not create intermediate *.tar for tar packages
Commit 05e96e96a315 ("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>
Diffstat (limited to 'scripts/Makefile.package')
-rw-r--r--scripts/Makefile.package26
1 files changed, 9 insertions, 17 deletions
diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index ed1784be72ce..4d90691505b1 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -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 $@
+compress-tar.gz = -I "$(KGZIP)"
+compress-tar.bz2 = -I "$(KBZIP2)"
+compress-tar.xz = -I "$(XZ)"
+compress-tar.zst = -I "$(ZSTD)"
+
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)
PHONY += dir-pkg