tools build: Fix perf_clean target
authorJiri Olsa <jolsa@kernel.org>
Mon, 25 Apr 2016 20:17:18 +0000 (22:17 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 25 Apr 2016 20:59:36 +0000 (17:59 -0300)
Fix perf_clean target to follow the same logic as perf target.

Fixes the following make invokation:

  $ cd <kernelsrc> && make tools/perf_clean

Reported-by: TJ <linux@iam.tj>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116411
Link: http://lkml.kernel.org/r/1461615438-27894-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/Makefile

index 60c7e6c8ff178c3cd6d1c7a9b04ae4b7fc00684f..6bf68fe7dd290dfeb9f51969f6b0d6d0cb38ab4c 100644 (file)
@@ -137,7 +137,8 @@ libsubcmd_clean:
        $(call descend,lib/subcmd,clean)
 
 perf_clean:
-       $(call descend,$(@:_clean=),clean)
+       $(Q)mkdir -p $(PERF_O) .
+       $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean
 
 selftests_clean:
        $(call descend,testing/$(@:_clean=),clean)