From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754249Ab3CNJO4 (ORCPT ); Thu, 14 Mar 2013 05:14:56 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:61465 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751909Ab3CNJOy (ORCPT ); Thu, 14 Mar 2013 05:14:54 -0400 From: chenggang To: linux-kernel@vger.kernel.org Cc: Chenggang Qin , David Ahern , Peter Zijlstra , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , Arjan van de Ven , Namhyung Kim , Yanmin Zhang , Wu Fengguang , Mike Galbraith , Andrew Morton Subject: [PATCH v3]Perf: Fix Makefile to clean all object files Date: Thu, 14 Mar 2013 17:14:28 +0800 Message-Id: <1363252468-10170-1-git-send-email-chenggang.qin@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chenggang Qin 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 Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Arjan van de Ven Cc: Namhyung Kim Cc: Yanmin Zhang Cc: Wu Fengguang Cc: Mike Galbraith Cc: Andrew Morton Signed-off-by: Chenggang Qin --- 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) . -name "*.o" -exec rm -f {} \; .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