quiet_cmd_archive = ARCHIVE $@
cmd_archive = git -C $(srctree) $(git-config-tar$(suffix $@)) archive \
- --output=$$(realpath $@) --prefix=$(basename $@)/ $(archive-args)
+ --output=$$(realpath $@) $(archive-args)
# Linux source tarball
# ---------------------------------------------------------------------------
linux-tarballs := $(addprefix linux, .tar.gz)
targets += $(linux-tarballs)
-$(linux-tarballs): archive-args = $$(cat $<)
+$(linux-tarballs): archive-args = --prefix=linux/ $$(cat $<)
$(linux-tarballs): .tmp_HEAD FORCE
$(call if_changed,archive)
perf-tarballs := $(addprefix perf-$(KERNELVERSION), .tar .tar.gz .tar.bz2 .tar.xz .tar.zst)
targets += $(perf-tarballs)
-$(perf-tarballs): archive-args = $(perf-archive-args)
+$(perf-tarballs): archive-args = --prefix=perf-$(KERNELVERSION)/ $(perf-archive-args)
$(perf-tarballs): tools/perf/MANIFEST .tmp_perf/HEAD .tmp_perf/PERF-VERSION-FILE FORCE
$(call if_changed,archive)