quiet_cmd_archive = ARCHIVE $@
cmd_archive = git -C $(srctree) $(git-config-tar$(suffix $@)) archive \
- --output=$$(realpath $@) --prefix=$(basename $@)/ $(archive-args)
+ --output=$$(realpath $@) $(archive-args)
+ suffix-gzip := .gz
+ suffix-bzip2 := .bz2
+ suffix-lzma := .lzma
+ suffix-xz := .xz
+
# Linux source tarball
# ---------------------------------------------------------------------------
- linux-tarballs := $(addprefix linux, .tar.gz)
+ linux-tarballs := $(addprefix linux, .tar.gz .tar.bz2 .tar.lzma .tar.xz)
targets += $(linux-tarballs)
-$(linux-tarballs): archive-args = $$(cat $<)
+$(linux-tarballs): archive-args = --prefix=linux/ $$(cat $<)
$(linux-tarballs): .tmp_HEAD FORCE
$(call if_changed,archive)