Skip to content

Commit 3bdccc8

Browse files
mfmooneymichal42
authored andcommitted
package: Makefile: fix perf target bug
Specify --git-dir when building perf targets to allow out-of-tree builds using O=<build-dir>. The shell command in `git archive' had to be modified to allow proper file name expansion of the files listed in MANIFEST. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
1 parent 55922c9 commit 3bdccc8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎scripts/package/Makefile‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,12 @@ perf-tar=perf-$(KERNELVERSION)
118118

119119
quiet_cmd_perf_tar = TAR
120120
cmd_perf_tar = \
121-
git archive --prefix=$(perf-tar)/ HEAD^{tree} \
122-
$$(cat $(srctree)/tools/perf/MANIFEST) -o $(perf-tar).tar; \
121+
git --git-dir=$(srctree)/.git archive --prefix=$(perf-tar)/ \
122+
HEAD^{tree} $$(cd $(srctree); \
123+
echo $$(cat $(srctree)/tools/perf/MANIFEST)) \
124+
-o $(perf-tar).tar; \
123125
mkdir -p $(perf-tar); \
124-
git rev-parse HEAD > $(perf-tar)/HEAD; \
126+
git --git-dir=$(srctree)/.git rev-parse HEAD > $(perf-tar)/HEAD; \
125127
tar rf $(perf-tar).tar $(perf-tar)/HEAD; \
126128
rm -r $(perf-tar); \
127129
$(if $(findstring tar-src,$@),, \

0 commit comments

Comments
 (0)