perf tools: Fix build errors with O and DESTDIR make vars set
authorRobert Richter <robert.richter@linaro.org>
Tue, 11 Jun 2013 15:22:38 +0000 (17:22 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 8 Jul 2013 20:34:00 +0000 (17:34 -0300)
Fixing build errors with O and DESTDIR make vars set:

 $ make prefix=/usr/local O=$builddir DESTDIR=$destdir -C tools/ perf
 ...
 make[1]: Entering directory `.../.source/perf/tools/perf'
     CC .../.build/perf/perf/util/parse-events.o
 util/parse-events.c:14:32: fatal error: parse-events-bison.h: No such file or directory
 compilation terminated.
 make[1]: *** [.../.build/perf/perf/util/parse-events.o] Error 1
 ...

and:

     LINK /.../.build/perf/perf/perf
 gcc: error: /.../.build/perf/perf//.../.source/perf/tools/lib/lk/liblk.a: No such file or directory

Signed-off-by: Robert Richter <robert.richter@linaro.org>
Signed-off-by: Robert Richter <rric@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Robert Richter <rric@kernel.org>
Link: http://lkml.kernel.org/r/1370964158-4135-1-git-send-email-rric@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile
tools/perf/config/Makefile

index 203cb0eecff2baf1419cdd7339d424cef92df505..641fccddb249964e30de988a056f229e8265283f 100644 (file)
@@ -121,17 +121,16 @@ SCRIPT_SH += perf-archive.sh
 grep-libs = $(filter -l%,$(1))
 strip-libs = $(filter-out -l%,$(1))
 
-LK_PATH=$(LK_DIR)
-
 ifneq ($(OUTPUT),)
   TE_PATH=$(OUTPUT)
 ifneq ($(subdir),)
-  LK_PATH=$(OUTPUT)$(LK_DIR)
+  LK_PATH=$(objtree)/lib/lk/
 else
   LK_PATH=$(OUTPUT)
 endif
 else
   TE_PATH=$(TRACE_EVENT_DIR)
+  LK_PATH=$(LK_DIR)
 endif
 
 LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
index f139dcd2796ef8f590d439234b0cbb255378394b..f4468954d3dc8628a95ad1f79f6deda41873530c 100644 (file)
@@ -39,7 +39,7 @@ src-perf := $(srctree)/tools/perf
 endif
 
 ifeq ($(obj-perf),)
-obj-perf := $(objtree)
+obj-perf := $(OUTPUT)
 endif
 
 ifneq ($(obj-perf),)