aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/tests/make21
1 files changed, 14 insertions, 7 deletions
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index fc2a9a31113f..29810cf2c117 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -13,10 +13,12 @@ else
13endif 13endif
14else 14else
15PERF := . 15PERF := .
16PERF_O := $(PERF)
16O_OPT := 17O_OPT :=
17 18
18ifneq ($(O),) 19ifneq ($(O),)
19 FULL_O := $(shell readlink -f $(O) || echo $(O)) 20 FULL_O := $(shell readlink -f $(O) || echo $(O))
21 PERF_O := $(FULL_O)
20 ifeq ($(SET_O),1) 22 ifeq ($(SET_O),1)
21 O_OPT := 'O=$(FULL_O)' 23 O_OPT := 'O=$(FULL_O)'
22 endif 24 endif
@@ -173,11 +175,11 @@ test_make_doc := $(test_ok)
173test_make_help_O := $(test_ok) 175test_make_help_O := $(test_ok)
174test_make_doc_O := $(test_ok) 176test_make_doc_O := $(test_ok)
175 177
176test_make_python_perf_so := test -f $(PERF)/python/perf.so 178test_make_python_perf_so := test -f $(PERF_O)/python/perf.so
177 179
178test_make_perf_o := test -f $(PERF)/perf.o 180test_make_perf_o := test -f $(PERF_O)/perf.o
179test_make_util_map_o := test -f $(PERF)/util/map.o 181test_make_util_map_o := test -f $(PERF_O)/util/map.o
180test_make_util_pmu_bison_o := test -f $(PERF)/util/pmu-bison.o 182test_make_util_pmu_bison_o := test -f $(PERF_O)/util/pmu-bison.o
181 183
182define test_dest_files 184define test_dest_files
183 for file in $(1); do \ 185 for file in $(1); do \
@@ -244,7 +246,7 @@ test_make_perf_o_O := test -f $$TMP_O/perf.o
244test_make_util_map_o_O := test -f $$TMP_O/util/map.o 246test_make_util_map_o_O := test -f $$TMP_O/util/map.o
245test_make_util_pmu_bison_o_O := test -f $$TMP_O/util/pmu-bison.o 247test_make_util_pmu_bison_o_O := test -f $$TMP_O/util/pmu-bison.o
246 248
247test_default = test -x $(PERF)/perf 249test_default = test -x $(PERF_O)/perf
248test = $(if $(test_$1),$(test_$1),$(test_default)) 250test = $(if $(test_$1),$(test_$1),$(test_default))
249 251
250test_default_O = test -x $$TMP_O/perf 252test_default_O = test -x $$TMP_O/perf
@@ -293,17 +295,22 @@ tarpkg:
293 ( eval $$cmd ) >> $@ 2>&1 && \ 295 ( eval $$cmd ) >> $@ 2>&1 && \
294 rm -f $@ 296 rm -f $@
295 297
298KERNEL_O := ../..
299ifneq ($(O),)
300 KERNEL_O := $(O)
301endif
302
296make_kernelsrc: 303make_kernelsrc:
297 @echo "- make -C <kernelsrc> $(PARALLEL_OPT) tools/perf" 304 @echo "- make -C <kernelsrc> $(PARALLEL_OPT) tools/perf"
298 $(call clean); \ 305 $(call clean); \
299 (make -C ../.. $(PARALLEL_OPT) tools/perf) > $@ 2>&1 && \ 306 (make -C ../.. $(PARALLEL_OPT) tools/perf) > $@ 2>&1 && \
300 test -x perf && rm -f $@ || (cat $@ ; false) 307 test -x $(KERNEL_O)/tools/perf/perf && rm -f $@ || (cat $@ ; false)
301 308
302make_kernelsrc_tools: 309make_kernelsrc_tools:
303 @echo "- make -C <kernelsrc>/tools $(PARALLEL_OPT) perf" 310 @echo "- make -C <kernelsrc>/tools $(PARALLEL_OPT) perf"
304 $(call clean); \ 311 $(call clean); \
305 (make -C ../../tools $(PARALLEL_OPT) perf) > $@ 2>&1 && \ 312 (make -C ../../tools $(PARALLEL_OPT) perf) > $@ 2>&1 && \
306 test -x perf && rm -f $@ || (cat $@ ; false) 313 test -x $(KERNEL_O)/tools/perf/perf && rm -f $@ || (cat $@ ; false)
307 314
308all: $(run) $(run_O) tarpkg make_kernelsrc make_kernelsrc_tools 315all: $(run) $(run_O) tarpkg make_kernelsrc make_kernelsrc_tools
309 @echo OK 316 @echo OK