aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-09 05:49:26 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-10-11 11:18:06 -0400
commit8ec19c0eba73d7221e93e993c1c8bd62484354e9 (patch)
tree9b06bca1c3f0388c66a7005a34bbf4a01d25f655 /tools
parentcee972c0e6940ec75bab2d02f37e96d06ce143eb (diff)
perf tools: Implement summary output for 'make clean'
'make clean' used to show all the rm lines, which isn't really informative in any way and spams the console. Implement summary output: comet:~/tip/tools/perf> make clean CLEAN libtraceevent CLEAN liblk CLEAN config CLEAN core-objs CLEAN core-progs CLEAN core-gen CLEAN Documentation CLEAN python 'make clean V=1' will still show the old, detailed output. Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1381312169-17354-2-git-send-email-mingo@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Documentation/Makefile18
-rw-r--r--tools/perf/Makefile.perf24
-rw-r--r--tools/perf/config/utilities.mak6
-rw-r--r--tools/scripts/Makefile.include2
4 files changed, 29 insertions, 21 deletions
diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index eaa477f00673..be5adb1e0290 100644
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -246,15 +246,17 @@ $(OUTPUT)cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT)
246 $(PERL_PATH) ./cmd-list.perl ../command-list.txt $(QUIET_STDERR) && \ 246 $(PERL_PATH) ./cmd-list.perl ../command-list.txt $(QUIET_STDERR) && \
247 date >$@ 247 date >$@
248 248
249CLEAN_FILES = \
250 $(MAN_XML) $(addsuffix +,$(MAN_XML)) \
251 $(MAN_HTML) $(addsuffix +,$(MAN_HTML)) \
252 $(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7) \
253 $(OUTPUT)*.texi $(OUTPUT)*.texi+ $(OUTPUT)*.texi++ \
254 $(OUTPUT)perf.info $(OUTPUT)perfman.info \
255 $(OUTPUT)howto-index.txt $(OUTPUT)howto/*.html $(OUTPUT)doc.dep \
256 $(OUTPUT)technical/api-*.html $(OUTPUT)technical/api-index.txt \
257 $(cmds_txt) $(OUTPUT)*.made
249clean: 258clean:
250 $(RM) $(MAN_XML) $(addsuffix +,$(MAN_XML)) 259 $(call QUIET_CLEAN, Documentation) $(RM) $(CLEAN_FILES)
251 $(RM) $(MAN_HTML) $(addsuffix +,$(MAN_HTML))
252 $(RM) $(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7)
253 $(RM) $(OUTPUT)*.texi $(OUTPUT)*.texi+ $(OUTPUT)*.texi++
254 $(RM) $(OUTPUT)perf.info $(OUTPUT)perfman.info
255 $(RM) $(OUTPUT)howto-index.txt $(OUTPUT)howto/*.html $(OUTPUT)doc.dep
256 $(RM) $(OUTPUT)technical/api-*.html $(OUTPUT)technical/api-index.txt
257 $(RM) $(cmds_txt) $(OUTPUT)*.made
258 260
259$(MAN_HTML): $(OUTPUT)%.html : %.txt 261$(MAN_HTML): $(OUTPUT)%.html : %.txt
260 $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ 262 $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 8bc6d0c4e776..250b276c136f 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -148,7 +148,7 @@ PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/
148PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/ 148PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/
149export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP 149export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP
150 150
151python-clean := rm -rf $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so 151python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so
152 152
153PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) 153PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
154PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBLK) 154PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBLK)
@@ -708,7 +708,8 @@ $(LIBTRACEEVENT): $(TE_SOURCES)
708 $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) libtraceevent.a 708 $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) libtraceevent.a
709 709
710$(LIBTRACEEVENT)-clean: 710$(LIBTRACEEVENT)-clean:
711 $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) clean 711 $(call QUIET_CLEAN, libtraceevent)
712 @$(MAKE) -C $(TRACE_EVENT_DIR) O=$(OUTPUT) clean >/dev/null
712 713
713LIBLK_SOURCES = $(wildcard $(LK_PATH)*.[ch]) 714LIBLK_SOURCES = $(wildcard $(LK_PATH)*.[ch])
714 715
@@ -721,7 +722,8 @@ endif
721 722
722$(LIBLK)-clean: 723$(LIBLK)-clean:
723ifeq ($(subdir),) 724ifeq ($(subdir),)
724 $(QUIET_SUBDIR0)$(LK_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) clean 725 $(call QUIET_CLEAN, liblk)
726 @$(MAKE) -C $(LK_DIR) O=$(OUTPUT) clean >/dev/null
725endif 727endif
726 728
727help: 729help:
@@ -850,17 +852,15 @@ $(INSTALL_DOC_TARGETS):
850# not get included for the clean target: 852# not get included for the clean target:
851# 853#
852config-clean: 854config-clean:
853 @$(MAKE) -C config/feature-checks clean 855 $(call QUIET_CLEAN, config)
856 @$(MAKE) -C config/feature-checks clean >/dev/null
854 857
855clean: $(LIBTRACEEVENT)-clean $(LIBLK)-clean config-clean 858clean: $(LIBTRACEEVENT)-clean $(LIBLK)-clean config-clean
856 $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(GTK_OBJS) 859 $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS) $(GTK_OBJS)
857 $(RM) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS) 860 $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf
858 $(RM) $(ALL_PROGRAMS) perf 861 $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex*
859 $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* 862 $(call QUIET_CLEAN, Documentation)
860 $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean 863 @$(MAKE) -C Documentation O=$(OUTPUT) clean >/dev/null
861 $(RM) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS
862 $(RM) $(OUTPUT)util/*-bison*
863 $(RM) $(OUTPUT)util/*-flex*
864 $(python-clean) 864 $(python-clean)
865 865
866# 866#
diff --git a/tools/perf/config/utilities.mak b/tools/perf/config/utilities.mak
index 4d985e0f03f5..94908a5fbea7 100644
--- a/tools/perf/config/utilities.mak
+++ b/tools/perf/config/utilities.mak
@@ -178,3 +178,9 @@ endef
178_ge_attempt = $(if $(get-executable),$(get-executable),$(_gea_warn)$(call _gea_err,$(2))) 178_ge_attempt = $(if $(get-executable),$(get-executable),$(_gea_warn)$(call _gea_err,$(2)))
179_gea_warn = $(warning The path '$(1)' is not executable.) 179_gea_warn = $(warning The path '$(1)' is not executable.)
180_gea_err = $(if $(1),$(error Please set '$(1)' appropriately)) 180_gea_err = $(if $(1),$(error Please set '$(1)' appropriately))
181
182ifneq ($(findstring $(MAKEFLAGS),s),s)
183 ifneq ($(V),1)
184 QUIET_CLEAN = @printf ' CLEAN %s\n' $(1);
185 endif
186endif
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 0d0506d55c71..1853736c8106 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -66,7 +66,7 @@ ifneq ($(V),1)
66 QUIET_MKDIR = @echo ' ' MKDIR $@; 66 QUIET_MKDIR = @echo ' ' MKDIR $@;
67 QUIET_GEN = @echo ' ' GEN $@; 67 QUIET_GEN = @echo ' ' GEN $@;
68 QUIET_SUBDIR0 = +@subdir= 68 QUIET_SUBDIR0 = +@subdir=
69 QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ 69 QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
70 $(MAKE) $(PRINT_DIR) -C $$subdir 70 $(MAKE) $(PRINT_DIR) -C $$subdir
71 QUIET_FLEX = @echo ' ' FLEX $@; 71 QUIET_FLEX = @echo ' ' FLEX $@;
72 QUIET_BISON = @echo ' ' BISON $@; 72 QUIET_BISON = @echo ' ' BISON $@;