From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> Have the output of cleaning a directory be a bit cleaner. This actually breaks the clean, but because of the way samples works, to fix that first will delete the Makefile of samples. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- Makefile | 6 +++--- scripts/utils.mk | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6e18e0a015f5..cd7cf28a2acd 100644 --- a/Makefile +++ b/Makefile @@ -375,9 +375,9 @@ samples: libtracefs.a force $(Q)$(call descend,$(src)/samples,all) clean: - $(Q)$(MAKE) -C $(src)/utest clean - $(Q)$(MAKE) -C $(src)/src clean - $(Q)$(MAKE) -C $(src)/samples clean + $(Q)$(call descend_clean,utest) + $(Q)$(call descend_clean,src) + $(Q)$(call descend_clean,samples) $(Q)$(call do_clean, \ $(TARGETS) $(bdir)/*.a $(bdir)/*.so $(bdir)/*.so.* $(bdir)/*.o $(bdir)/.*.d \ $(PKG_CONFIG_FILE) \ diff --git a/scripts/utils.mk b/scripts/utils.mk index 3bf59c550b1d..5f43de1385cd 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -123,6 +123,8 @@ descend = \ mkdir -p $(obj)/$(BASE1); \ $(MAKE) $(PRINT_DIR) bdir=$(obj)/$(BASE1) -C $(1) $(2)) +descend_clean = \ + $(MAKE) $(PRINT_DIR) bdir=$(obj)/$(BASE1) -C $(1) clean define make_version.h (echo '/* This file is automatically generated. Do not modify. */'; \ -- 2.33.0