Re: [Resend PATCH] package: Makefile: fix perf target bug

Michal Marek
2011-05-12T20:30:38Z

On 12.5.2011 20:25, mfmooney@gmail.com wrote:
> diff --git a/scripts/package/Makefile b/scripts/package/Makefile
> index 1b7eaea..a32dc2d 100644
> --- a/scripts/package/Makefile
> +++ b/scripts/package/Makefile
> @@ -118,10 +118,14 @@ 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 --work-tree=$(srctree) \

Neither git archive not git rev-parse need the work tree, --git-dir=..
is sufficient.

Michal

> + archive --prefix=$(perf-tar)/ HEAD^{tree} \
> + $(addprefix $(srctree)/, \
> + $(shell 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 --work-tree=$(srctree) \
> + rev-parse HEAD > $(perf-tar)/HEAD; \
> tar rf $(perf-tar).tar $(perf-tar)/HEAD; \
> rm -r $(perf-tar); \
> $(if $(findstring tar-src,$@),, \