diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-02-15 10:20:31 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-02-26 15:23:30 +0900 |
commit | 1fc9095846cc0b7a4d027da2d0bd7569914bf129 (patch) | |
tree | 04b6a44f74a57c545f8d5197042f2d739ad28014 /scripts/Makefile.package | |
parent | e0ca16749ac3392a5a2ea4e67327fa71ef4aa680 (diff) | |
download | lwn-1fc9095846cc0b7a4d027da2d0bd7569914bf129.tar.gz lwn-1fc9095846cc0b7a4d027da2d0bd7569914bf129.zip |
kbuild: tar-pkg: use tar rules in scripts/Makefile.package
Use %.tar, %.tar.gz, %.tar.bz2, %.tar.xz, %.tar.zst rules in
scripts/Makefile.package.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/Makefile.package')
-rw-r--r-- | scripts/Makefile.package | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/scripts/Makefile.package b/scripts/Makefile.package index 50b86b325d7a..b941e6341b36 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -145,13 +145,30 @@ snap-pkg: cd $(objtree)/snap && \ snapcraft --target-arch=$(UTS_MACHINE) -# tarball targets +# dir-pkg tar*-pkg - tarball targets # --------------------------------------------------------------------------- -tar-pkgs := dir-pkg tar-pkg targz-pkg tarbz2-pkg tarxz-pkg tarzst-pkg -PHONY += $(tar-pkgs) -$(tar-pkgs): - $(MAKE) -f $(srctree)/Makefile - +$(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@ + +tar-pkg-tarball = linux-$(KERNELRELEASE)-$(ARCH).$(1) +tar-pkg-phony = $(subst .,,$(1))-pkg + +tar-install: FORCE + $(Q)$(MAKE) -f $(srctree)/Makefile + +$(Q)$(srctree)/scripts/package/buildtar $@ + +PHONY += dir-pkg +dir-pkg: tar-install + @echo "Kernel tree successfully created in $<" + +define tar-pkg-rule +PHONY += $(tar-pkg-phony) +$(tar-pkg-phony): $(tar-pkg-tarball) + @: + +$(tar-pkg-tarball): private tar-rootdir := tar-install +$(tar-pkg-tarball): tar-install +endef + +$(foreach x, tar tar.gz tar.bz2 tar.xz tar.zst, $(eval $(call tar-pkg-rule,$(x)))) # perf-tar*-src-pkg - generate a source tarball with perf source # --------------------------------------------------------------------------- |