lkml.org 
[lkml]   [2013]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4]Perf: Fix Makefile to clean all object files
Date
From: Chenggang Qin <chenggang.qcg@taobao.com>

If we execute "make clean" in perf's directory, many object files cannot be
cleaned in the current version.
For example:
While we run "make clean" in perf's directory, and run the command:
"fine ./ -name "*.o""
we will get:
------------------------------------
./arch/x86/util/unwind.o
./arch/x86/util/header.o
./arch/x86/util/dwarf-regs.o
./util/scripting-engines/trace-event-python.o
./util/scripting-engines/trace-event-perl.o
./util/probe-finder.o
./util/dwarf-aux.o
./util/unwind.o
... ...
------------------------------------
These ".o" files are not cleaned.

The reason is:
These object files are added into "BUILTIN_OBJS" while "make" process check the environment.
If the make command is "clean", the environment check process is not executed. So,
these object files will not be added into "BUILTIN_OBJS" while we execute "make clean".

This patch fixed this problem.
We only add a command:
"find . -name "*.o" -exec rm -f {} \;"

Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Yanmin Zhang <yanmin.zhang@intel.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chenggang Qin <chenggang.qcg@taobao.com>

---
tools/perf/Makefile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index a2108ca..dec08ba 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -1174,6 +1174,7 @@ clean: $(LIBTRACEEVENT)-clean
$(RM) $(OUTPUT)util/*-bison*
$(RM) $(OUTPUT)util/*-flex*
$(python-clean)
+ $(FIND) $(OUTPUT) -name "*.o" -delete

.PHONY: all install clean strip $(LIBTRACEEVENT)
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
--
1.7.8.rc2.5.g815b


\
 
 \ /
  Last update: 2013-03-14 12:42    [W:0.030 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site