From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A53A4C433F5 for ; Fri, 17 Dec 2021 00:42:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230292AbhLQAmU (ORCPT ); Thu, 16 Dec 2021 19:42:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229997AbhLQAmS (ORCPT ); Thu, 16 Dec 2021 19:42:18 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30F89C061574 for ; Thu, 16 Dec 2021 16:42:18 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C505861FE2 for ; Fri, 17 Dec 2021 00:42:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5005C36AEB; Fri, 17 Dec 2021 00:42:16 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my1KB-0004D6-R8; Thu, 16 Dec 2021 19:42:15 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH 5/9] libtracefs: Have make clean output cleaner Date: Thu, 16 Dec 2021 19:42:10 -0500 Message-Id: <20211217004214.16074-6-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217004214.16074-1-rostedt@goodmis.org> References: <20211217004214.16074-1-rostedt@goodmis.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" Instead of showing the files being removed by make clean, just output a command stating what directory the clean is happening in. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 13 +++++++------ samples/Makefile | 2 +- scripts/utils.mk | 8 ++++++++ src/Makefile | 2 +- utest/Makefile | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 7ef85288abf1..58b4219e7b62 100644 --- a/Makefile +++ b/Makefile @@ -365,11 +365,12 @@ samples: $(LIBTRACEFS_STATIC) force $(Q)$(call descend,$(src)/samples,all) clean: - $(MAKE) -C $(src)/utest clean - $(MAKE) -C $(src)/src clean - $(MAKE) -C $(src)/samples clean - $(RM) $(TARGETS) $(bdir)/*.a $(bdir)/*.so $(bdir)/*.so.* $(bdir)/*.o $(bdir)/.*.d - $(RM) $(PKG_CONFIG_FILE) - $(RM) $(VERSION_FILE) + $(Q)$(MAKE) -C $(src)/utest clean + $(Q)$(MAKE) -C $(src)/src clean + $(Q)$(MAKE) -C $(src)/samples clean + $(Q)$(call do_clean, \ + $(TARGETS) $(bdir)/*.a $(bdir)/*.so $(bdir)/*.so.* $(bdir)/*.o $(bdir)/.*.d \ + $(PKG_CONFIG_FILE) \ + $(VERSION_FILE)) .PHONY: clean diff --git a/samples/Makefile b/samples/Makefile index 2d0d2397c5b4..8e2b53bbdfae 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -66,4 +66,4 @@ $(EXAMPLES): $(patsubst %,$(bdir)/%,$(TARGETS)) $(CC) -g -Wall $(CFLAGS) -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) clean: - $(RM) $(bdir)/* + $(Q)$(call do_clean,$(bdir)/*) diff --git a/scripts/utils.mk b/scripts/utils.mk index 404b929a2b5f..c9b908f1c5d9 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -2,9 +2,11 @@ # Utils + PWD := $(shell /bin/pwd) GOBJ = $(notdir $(strip $@)) BASE1 = $(notdir $(strip $1)) BASE2 = $(notdir $(strip $2)) + BASEPWD = $(notdir $(strip $(PWD))) ifeq ($(VERBOSE),1) @@ -27,6 +29,7 @@ ifeq ($(findstring 1,$(SILENT)$(VERBOSE)),1) print_uninstall = print_update = print_descend = + print_clean = else print_compile = echo ' COMPILE '$(GOBJ); print_app_build = echo ' BUILD '$(GOBJ); @@ -39,6 +42,7 @@ else print_uninstall = echo ' UNINSTALL $(DESTDIR_SQ)$1'; print_update = echo ' UPDATE '$(GOBJ); print_descend = echo ' DESCEND '$(BASE1) $(BASE2); + print_clean = echo ' CLEAN '$(BASEPWD); endif do_fpic_compile = \ @@ -78,6 +82,10 @@ do_python_plugin_build = \ ($(print_plugin_build) \ $(CC) $< -shared $(LDFLAGS) $(PYTHON_LDFLAGS) -o $@) +do_clean = \ + ($(print_clean) \ + $(RM) $1) + ifneq ($(findstring $(MAKEFLAGS), w),w) PRINT_DIR = --no-print-directory else diff --git a/src/Makefile b/src/Makefile index cda0a0cda6e3..8f258a218f97 100644 --- a/src/Makefile +++ b/src/Makefile @@ -61,7 +61,7 @@ $(OBJS): | $(bdir) $(DEPS): | $(bdir) clean: - $(RM) $(OBJS) + $(Q)$(call do_clean,$(OBJS)) dep_includes := $(wildcard $(DEPS)) diff --git a/utest/Makefile b/utest/Makefile index 48993650660c..d168b01a328c 100644 --- a/utest/Makefile +++ b/utest/Makefile @@ -40,4 +40,4 @@ dep_includes := $(wildcard $(DEPS)) test: $(TARGETS) clean: - $(RM) $(TARGETS) $(bdir)/*.o $(bdir)/.*.d + $(Q)$(call do_clean,$(TARGETS) $(bdir)/*.o $(bdir)/.*.d) -- 2.33.0