Skip to content

Commit

Permalink
package: Makefile: fix perf target bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
matt mooney authored and Michal Marek committed Jun 24, 2011
1 parent 55922c9 commit 3bdccc8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ perf-tar=perf-$(KERNELVERSION)

quiet_cmd_perf_tar = TAR
cmd_perf_tar = \
git archive --prefix=$(perf-tar)/ HEAD^{tree} \
$$(cat $(srctree)/tools/perf/MANIFEST) -o $(perf-tar).tar; \
git --git-dir=$(srctree)/.git archive --prefix=$(perf-tar)/ \
HEAD^{tree} $$(cd $(srctree); \
echo $$(cat $(srctree)/tools/perf/MANIFEST)) \
-o $(perf-tar).tar; \
mkdir -p $(perf-tar); \
git rev-parse HEAD > $(perf-tar)/HEAD; \
git --git-dir=$(srctree)/.git rev-parse HEAD > $(perf-tar)/HEAD; \
tar rf $(perf-tar).tar $(perf-tar)/HEAD; \
rm -r $(perf-tar); \
$(if $(findstring tar-src,$@),, \
Expand Down

0 comments on commit 3bdccc8

Please sign in to comment.