diff options
author | Jiri Olsa <jolsa@kernel.org> | 2015-01-11 17:59:55 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-12 15:57:10 -0500 |
commit | ceed252fe0b8b7975845ed4cb9e6069d8a12f233 (patch) | |
tree | 3eaa44749004acc40ce1cbcbc2c8901c4b86f84d /tools/perf/Makefile.perf | |
parent | 9244e2c673fb148abb7706e47b602d009c537c9b (diff) |
perf build: Display make commands on V=1
Get more verbose output wrt displaying executed commands from make.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-68v67h59zoz7ilb1ggcuff3j@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile.perf')
-rw-r--r-- | tools/perf/Makefile.perf | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 4eeec571e102..efc5158738f4 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
@@ -89,13 +89,19 @@ VPATH += $(OUTPUT) | |||
89 | export VPATH | 89 | export VPATH |
90 | endif | 90 | endif |
91 | 91 | ||
92 | ifeq ($(V),1) | ||
93 | Q = | ||
94 | else | ||
95 | Q = @ | ||
96 | endif | ||
97 | |||
92 | # Do not use make's built-in rules | 98 | # Do not use make's built-in rules |
93 | # (this improves performance and avoids hard-to-debug behaviour); | 99 | # (this improves performance and avoids hard-to-debug behaviour); |
94 | MAKEFLAGS += -r | 100 | MAKEFLAGS += -r |
95 | 101 | ||
96 | $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD | 102 | $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD |
97 | @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) | 103 | $(Q)$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) |
98 | @touch $(OUTPUT)PERF-VERSION-FILE | 104 | $(Q)touch $(OUTPUT)PERF-VERSION-FILE |
99 | 105 | ||
100 | CC = $(CROSS_COMPILE)gcc | 106 | CC = $(CROSS_COMPILE)gcc |
101 | LD = $(CROSS_COMPILE)ld | 107 | LD = $(CROSS_COMPILE)ld |
@@ -251,7 +257,7 @@ SHELL = $(SHELL_PATH) | |||
251 | all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) | 257 | all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) |
252 | 258 | ||
253 | please_set_SHELL_PATH_to_a_more_modern_shell: | 259 | please_set_SHELL_PATH_to_a_more_modern_shell: |
254 | @$$(:) | 260 | $(Q)$$(:) |
255 | 261 | ||
256 | shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell | 262 | shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell |
257 | 263 | ||
@@ -264,13 +270,13 @@ export srctree OUTPUT RM CC LD AR CFLAGS V BISON FLEX | |||
264 | build := -f $(srctree)/tools/build/Makefile.build dir=. obj | 270 | build := -f $(srctree)/tools/build/Makefile.build dir=. obj |
265 | 271 | ||
266 | $(PERF_IN): $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h FORCE | 272 | $(PERF_IN): $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h FORCE |
267 | @$(MAKE) $(build)=perf | 273 | $(Q)$(MAKE) $(build)=perf |
268 | 274 | ||
269 | $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) | 275 | $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) |
270 | $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(PERF_IN) $(LIBS) -o $@ | 276 | $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(PERF_IN) $(LIBS) -o $@ |
271 | 277 | ||
272 | $(GTK_IN): FORCE | 278 | $(GTK_IN): FORCE |
273 | @$(MAKE) $(build)=gtk | 279 | $(Q)$(MAKE) $(build)=gtk |
274 | 280 | ||
275 | $(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS) | 281 | $(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS) |
276 | $(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS) | 282 | $(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS) |
@@ -315,25 +321,25 @@ build-dir = $(if $(__build-dir),$(__build-dir),.) | |||
315 | single_dep: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h | 321 | single_dep: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h |
316 | 322 | ||
317 | $(OUTPUT)%.o: %.c single_dep FORCE | 323 | $(OUTPUT)%.o: %.c single_dep FORCE |
318 | @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ | 324 | $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ |
319 | 325 | ||
320 | $(OUTPUT)%.i: %.c single_dep FORCE | 326 | $(OUTPUT)%.i: %.c single_dep FORCE |
321 | @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ | 327 | $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ |
322 | 328 | ||
323 | $(OUTPUT)%.s: %.c single_dep FORCE | 329 | $(OUTPUT)%.s: %.c single_dep FORCE |
324 | @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ | 330 | $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ |
325 | 331 | ||
326 | $(OUTPUT)%-bison.o: %.c single_dep FORCE | 332 | $(OUTPUT)%-bison.o: %.c single_dep FORCE |
327 | @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ | 333 | $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ |
328 | 334 | ||
329 | $(OUTPUT)%-flex.o: %.c single_dep FORCE | 335 | $(OUTPUT)%-flex.o: %.c single_dep FORCE |
330 | @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ | 336 | $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ |
331 | 337 | ||
332 | $(OUTPUT)%.o: %.S single_dep FORCE | 338 | $(OUTPUT)%.o: %.S single_dep FORCE |
333 | @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ | 339 | $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ |
334 | 340 | ||
335 | $(OUTPUT)%.i: %.S single_dep FORCE | 341 | $(OUTPUT)%.i: %.S single_dep FORCE |
336 | @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ | 342 | $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ |
337 | 343 | ||
338 | $(OUTPUT)perf-%: %.o $(PERFLIBS) | 344 | $(OUTPUT)perf-%: %.o $(PERFLIBS) |
339 | $(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(filter %.o,$^) $(LIBS) | 345 | $(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(filter %.o,$^) $(LIBS) |
@@ -353,7 +359,7 @@ $(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h) | |||
353 | LIBPERF_IN := $(OUTPUT)libperf-in.o | 359 | LIBPERF_IN := $(OUTPUT)libperf-in.o |
354 | 360 | ||
355 | $(LIBPERF_IN): FORCE | 361 | $(LIBPERF_IN): FORCE |
356 | @$(MAKE) $(build)=libperf | 362 | $(Q)$(MAKE) $(build)=libperf |
357 | 363 | ||
358 | $(LIB_FILE): $(LIBPERF_IN) | 364 | $(LIB_FILE): $(LIBPERF_IN) |
359 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIBPERF_IN) $(LIB_OBJS) | 365 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIBPERF_IN) $(LIB_OBJS) |
@@ -361,21 +367,21 @@ $(LIB_FILE): $(LIBPERF_IN) | |||
361 | LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) | 367 | LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) |
362 | 368 | ||
363 | $(LIBTRACEEVENT): FORCE | 369 | $(LIBTRACEEVENT): FORCE |
364 | @$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a plugins | 370 | $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a plugins |
365 | 371 | ||
366 | $(LIBTRACEEVENT)-clean: | 372 | $(LIBTRACEEVENT)-clean: |
367 | $(call QUIET_CLEAN, libtraceevent) | 373 | $(call QUIET_CLEAN, libtraceevent) |
368 | @$(MAKE) -C $(TRACE_EVENT_DIR) O=$(OUTPUT) clean >/dev/null | 374 | $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) O=$(OUTPUT) clean >/dev/null |
369 | 375 | ||
370 | install-traceevent-plugins: $(LIBTRACEEVENT) | 376 | install-traceevent-plugins: $(LIBTRACEEVENT) |
371 | @$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) install_plugins | 377 | $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) install_plugins |
372 | 378 | ||
373 | $(LIBAPI): FORCE | 379 | $(LIBAPI): FORCE |
374 | @$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a | 380 | $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a |
375 | 381 | ||
376 | $(LIBAPI)-clean: | 382 | $(LIBAPI)-clean: |
377 | $(call QUIET_CLEAN, libapi) | 383 | $(call QUIET_CLEAN, libapi) |
378 | @$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null | 384 | $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null |
379 | 385 | ||
380 | help: | 386 | help: |
381 | @echo 'Perf make targets:' | 387 | @echo 'Perf make targets:' |
@@ -513,12 +519,12 @@ $(INSTALL_DOC_TARGETS): | |||
513 | # | 519 | # |
514 | config-clean: | 520 | config-clean: |
515 | $(call QUIET_CLEAN, config) | 521 | $(call QUIET_CLEAN, config) |
516 | @$(MAKE) -C config/feature-checks clean >/dev/null | 522 | $(Q)$(MAKE) -C config/feature-checks clean >/dev/null |
517 | 523 | ||
518 | clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean config-clean | 524 | clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean config-clean |
519 | $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS) | 525 | $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS) |
520 | @find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete | 526 | $(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete |
521 | @$(RM) .config-detected | 527 | $(Q)$(RM) .config-detected |
522 | $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 | 528 | $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 |
523 | $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-FEATURES $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* | 529 | $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-FEATURES $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* |
524 | $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean | 530 | $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean |