Re: [GIT PULL] perf fixes

From: Arnaldo Carvalho de Melo
Date: Thu Sep 12 2013 - 15:12:23 EST


Em Thu, Sep 12, 2013 at 03:43:41PM -0300, Arnaldo Carvalho de Melo escreveu:
> But if I do it as a normal user and then try installing as root... it
> behaves like you described, duh :-\
>
> Because of this:
>
> * new build flags or prefix
>
> Will check...

This is the cause:


### Detect prefix changes
TRACK_CFLAGS = $(subst ','\'',$(CFLAGS)):\
$(bindir_SQ):$(perfexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)

$(OUTPUT)PERF-CFLAGS: .FORCE-PERF-CFLAGS
@FLAGS='$(TRACK_CFLAGS)'; \
if test x"$$FLAGS" != x"`cat $(OUTPUT)PERF-CFLAGS 2>/dev/null`" ; then \
echo 1>&2 " * new build flags or prefix"; \
echo "$$FLAGS" >$(OUTPUT)PERF-CFLAGS; \
fi

That "prefix" thing, i.e.:

$(bindir_SQ):$(perfexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)


As user it is:

/home/acme/bin:libexec/perf-core:share/perf-core/templates:/home/acme

while as root it becomes:

/root/bin:libexec/perf-core:share/perf-core/templates:/root

And that causes the whole thing to be rebuilt when going from 'make' as normal
user to 'make install' as root.

All the other things in that TRACK_CFLAGS part is equal.

We probably got all this from the 'git' makefile, checking how it is done
there these days...

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/