Skip to contentSkip to conversation

tools: Factor traceevent/perf Makefile

PATCH In review Jiri Olsa 3 participants 23 messages Dec 19, 2013 – Jan 12, 2014 perf events

lore
Share & tools
lore

Jiri Olsa

author
#0 lore raw

cover tools: Factor traceevent/perf Makefile

hi,
sending out the change to introduce single:
INSTALL trace_plugins
build output line. Some more code factoring was needed.

Also updated the tests/make install tests to check for installed plugins.

thanks,
jirka

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>

---
Jiri Olsa (9):
perf tests: Factor make install tests
perf tools: Making QUIET_(CLEAN|INSTAL) variables global tools lib traceevent: Remove print_app_build variable tools lib traceevent: Use global QUIET_CC build output tools lib traceevent: Add global QUIET_CC_FPIC build output tools lib traceevent: Use global QUIET_LINK build output tools lib traceevent: Use global QUIET_INSTALL build output tools lib traceevent: Use global QUIET_CLEAN build output tools lib traceevent: Use global 'O' processing code

 tools/lib/traceevent/Makefile   | 85 ++++++++++++++++++++++++++++---------------------------------------------------------
 tools/perf/config/utilities.mak |  7 -------
 tools/perf/tests/make           | 38 ++++++++++++++++++++++++++++++++------
 tools/scripts/Makefile.include  |  4 ++++
 4 files changed, 64 insertions(+), 70 deletions(-)
author
#1 lore raw

PATCH 1/9 perf tests: Factor make install tests

Factoring make install tests to check for multiple files. Adding default set of installed files for install and install_bin tests.

Putting the 'test' line into the log file instead to the screen as it gets more complex now.

If the tests fails to find a file, following message is displayed:

$ make -f tests/make make_install_bin
- make_install_bin: cd . && make -f Makefile DESTDIR=/tmp/tmp.nCVuQoSHaJ install-bin
  failed to find: bin/perf
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/perf/tests/make | 38 ++++++++++++++++++++++++++++++++------
 1 file changed, 32 insertions(+), 6 deletions(-)
tools/perf/tests/make +32 -6
index 2ca0abf..f641c35 100644
@@ -106,10 +106,36 @@ test_make_python_perf_so := test -f $(PERF)/python/perf.so
 test_make_perf_o     := test -f $(PERF)/perf.o
 test_make_util_map_o := test -f $(PERF)/util/map.o
 
-test_make_install       := test -x $$TMP_DEST/bin/perf
-test_make_install_O     := $(test_make_install)
-test_make_install_bin   := $(test_make_install)
-test_make_install_bin_O := $(test_make_install)
+define test_dest_files
+  for file in $(1); do				\
+    if [ ! -x $$TMP_DEST/$$file ]; then		\
+      echo "  failed to find: $$file";		\
+    fi						\
+  done
+endef
+
+installed_files_bin := bin/perf
+installed_files_bin += etc/bash_completion.d/perf
+installed_files_bin += libexec/perf-core/perf-archive
+
+installed_files_plugins := lib64/traceevent/plugins/plugin_cfg80211.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_scsi.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_xen.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_function.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_sched_switch.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_mac80211.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_kvm.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_kmem.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_hrtimer.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_jbd2.so
+
+installed_files_all := $(installed_files_bin)
+installed_files_all += $(installed_files_plugins)
+
+test_make_install       := $(call test_dest_files,$(installed_files_all))
+test_make_install_O     := $(call test_dest_files,$(installed_files_all))
+test_make_install_bin   := $(call test_dest_files,$(installed_files_bin))
+test_make_install_bin_O := $(call test_dest_files,$(installed_files_bin))
 
 # FIXME nothing gets installed
 test_make_install_man    := test -f $$TMP_DEST/share/man/man1/perf.1
@@ -162,7 +188,7 @@ $(run):
 	cmd="cd $(PERF) && make -f $(MK) DESTDIR=$$TMP_DEST $($@)"; \
 	echo "- $@: $$cmd" && echo $$cmd > $@ && \
 	( eval $$cmd ) >> $@ 2>&1; \
-	echo "  test: $(call test,$@)"; \
+	echo "  test: $(call test,$@)" >> $@ 2>&1; \
 	$(call test,$@) && \
 	rm -f $@ \
 	rm -rf $$TMP_DEST
@@ -174,7 +200,7 @@ $(run_O):
 	cmd="cd $(PERF) && make -f $(MK) O=$$TMP_O DESTDIR=$$TMP_DEST $($(patsubst %_O,%,$@))"; \
 	echo "- $@: $$cmd" && echo $$cmd > $@ && \
 	( eval $$cmd ) >> $@ 2>&1 && \
-	echo "  test: $(call test_O,$@)"; \
+	echo "  test: $(call test_O,$@)" >> $@ 2>&1; \
 	$(call test_O,$@) && \
 	rm -f $@ && \
 	rm -rf $$TMP_O \
Signature · 1 line
1.8.3.1
#2 lore raw

[tip:perf/core] perf tests: Factor make install tests

perf tests: Factor make install tests
Commit-ID:  ee4ad93e82b8fd260ae618f6b0413cd321bc09cb
Gitweb:     http://git.kernel.org/tip/ee4ad93e82b8fd260ae618f6b0413cd321bc09cb
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 19 Dec 2013 14:41:59 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 19 Dec 2013 16:18:08 -0300

perf tests: Factor make install tests

Factoring make install tests to check for multiple files. Adding default set of installed files for install and install_bin tests.

Putting the 'test' line into the log file instead to the screen as it gets more complex now.

If the tests fails to find a file, following message is displayed:

$ make -f tests/make make_install_bin
- make_install_bin: cd . && make -f Makefile DESTDIR=/tmp/tmp.nCVuQoSHaJ install-bin
  failed to find: bin/perf
Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/perf/tests/make | 38 ++++++++++++++++++++++++++++++++------
 1 file changed, 32 insertions(+), 6 deletions(-)
tools/perf/tests/make +32 -6
index 2ca0abf..f641c35 100644
@@ -106,10 +106,36 @@ test_make_python_perf_so := test -f $(PERF)/python/perf.so
 test_make_perf_o     := test -f $(PERF)/perf.o
 test_make_util_map_o := test -f $(PERF)/util/map.o
 
-test_make_install       := test -x $$TMP_DEST/bin/perf
-test_make_install_O     := $(test_make_install)
-test_make_install_bin   := $(test_make_install)
-test_make_install_bin_O := $(test_make_install)
+define test_dest_files
+  for file in $(1); do				\
+    if [ ! -x $$TMP_DEST/$$file ]; then		\
+      echo "  failed to find: $$file";		\
+    fi						\
+  done
+endef
+
+installed_files_bin := bin/perf
+installed_files_bin += etc/bash_completion.d/perf
+installed_files_bin += libexec/perf-core/perf-archive
+
+installed_files_plugins := lib64/traceevent/plugins/plugin_cfg80211.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_scsi.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_xen.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_function.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_sched_switch.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_mac80211.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_kvm.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_kmem.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_hrtimer.so
+installed_files_plugins += lib64/traceevent/plugins/plugin_jbd2.so
+
+installed_files_all := $(installed_files_bin)
+installed_files_all += $(installed_files_plugins)
+
+test_make_install       := $(call test_dest_files,$(installed_files_all))
+test_make_install_O     := $(call test_dest_files,$(installed_files_all))
+test_make_install_bin   := $(call test_dest_files,$(installed_files_bin))
+test_make_install_bin_O := $(call test_dest_files,$(installed_files_bin))
 
 # FIXME nothing gets installed
 test_make_install_man    := test -f $$TMP_DEST/share/man/man1/perf.1
@@ -162,7 +188,7 @@ $(run):
 	cmd="cd $(PERF) && make -f $(MK) DESTDIR=$$TMP_DEST $($@)"; \
 	echo "- $@: $$cmd" && echo $$cmd > $@ && \
 	( eval $$cmd ) >> $@ 2>&1; \
-	echo "  test: $(call test,$@)"; \
+	echo "  test: $(call test,$@)" >> $@ 2>&1; \
 	$(call test,$@) && \
 	rm -f $@ \
 	rm -rf $$TMP_DEST
@@ -174,7 +200,7 @@ $(run_O):
 	cmd="cd $(PERF) && make -f $(MK) O=$$TMP_O DESTDIR=$$TMP_DEST $($(patsubst %_O,%,$@))"; \
 	echo "- $@: $$cmd" && echo $$cmd > $@ && \
 	( eval $$cmd ) >> $@ 2>&1 && \
-	echo "  test: $(call test_O,$@)"; \
+	echo "  test: $(call test_O,$@)" >> $@ 2>&1; \
 	$(call test_O,$@) && \
 	rm -f $@ && \
 	rm -rf $$TMP_O \
author
#3 lore raw

PATCH 2/9 perf tools: Making QUIET_(CLEAN|INSTAL) variables global

In reply to Jiri Olsa

Moving QUIET_(CLEAN|INSTAL) variables into:
tools/scripts/Makefile.include

to be usable by other tools. The change to use them in libtraceevent is in following patches.

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/perf/config/utilities.mak | 7 -------
 tools/scripts/Makefile.include  | 3 +++
 2 files changed, 3 insertions(+), 7 deletions(-)
tools/perf/config/utilities.mak +0 -7
index f168deb..4d985e0 100644
@@ -178,10 +178,3 @@ endef
 _ge_attempt = $(if $(get-executable),$(get-executable),$(_gea_warn)$(call _gea_err,$(2)))
 _gea_warn = $(warning The path '$(1)' is not executable.)
 _gea_err  = $(if $(1),$(error Please set '$(1)' appropriately))
-
-ifneq ($(findstring $(MAKEFLAGS),s),s)
-  ifneq ($(V),1)
-    QUIET_CLEAN		= @printf '  CLEAN    %s\n' $1;
-    QUIET_INSTALL	= @printf '  INSTALL  %s\n' $1;
-  endif
-endif
tools/scripts/Makefile.include +3 -0
index ee76544..e4cfbed 100644
@@ -76,5 +76,8 @@ ifneq ($(findstring $(MAKEFLAGS),s),s)
 		+@echo	       '  DESCEND  '$(1); \
 		mkdir -p $(OUTPUT)$(1) && \
 		$(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1) $(2)
+
+	QUIET_CLEAN    = @printf '  CLEAN    %s\n' $1;
+	QUIET_INSTALL  = @printf '  INSTALL  %s\n' $1;
   endif
 endif
Signature · 1 line
1.8.3.1
#4 lore raw

[tip:perf/core] perf tools: Making QUIET_(CLEAN|INSTAL) variables global

perf tools: Making QUIET_(CLEAN|INSTAL) variables global
Commit-ID:  b7248defce917acce74b338d69c2b8f600370213
Gitweb:     http://git.kernel.org/tip/b7248defce917acce74b338d69c2b8f600370213
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 19 Dec 2013 14:42:00 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 19 Dec 2013 16:18:08 -0300

perf tools: Making QUIET_(CLEAN|INSTAL) variables global

Moving QUIET_(CLEAN|INSTAL) variables into:

tools/scripts/Makefile.include

to be usable by other tools. The change to use them in libtraceevent is in following patches.

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/perf/config/utilities.mak | 7 -------
 tools/scripts/Makefile.include  | 3 +++
 2 files changed, 3 insertions(+), 7 deletions(-)
tools/perf/config/utilities.mak +0 -7
index f168deb..4d985e0 100644
@@ -178,10 +178,3 @@ endef
 _ge_attempt = $(if $(get-executable),$(get-executable),$(_gea_warn)$(call _gea_err,$(2)))
 _gea_warn = $(warning The path '$(1)' is not executable.)
 _gea_err  = $(if $(1),$(error Please set '$(1)' appropriately))
-
-ifneq ($(findstring $(MAKEFLAGS),s),s)
-  ifneq ($(V),1)
-    QUIET_CLEAN		= @printf '  CLEAN    %s\n' $1;
-    QUIET_INSTALL	= @printf '  INSTALL  %s\n' $1;
-  endif
-endif
tools/scripts/Makefile.include +3 -0
index ee76544..e4cfbed 100644
@@ -76,5 +76,8 @@ ifneq ($(findstring $(MAKEFLAGS),s),s)
 		+@echo	       '  DESCEND  '$(1); \
 		mkdir -p $(OUTPUT)$(1) && \
 		$(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1) $(2)
+
+	QUIET_CLEAN    = @printf '  CLEAN    %s\n' $1;
+	QUIET_INSTALL  = @printf '  INSTALL  %s\n' $1;
   endif
 endif
author
#5 lore raw

PATCH 3/9 tools lib traceevent: Remove print_app_build variable

In reply to Jiri Olsa

Removing print_app_build variable, because it's not needed.

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/lib/traceevent/Makefile | 6 ------
 1 file changed, 6 deletions(-)
tools/lib/traceevent/Makefile +0 -6
index 0d9cbb4..022c987 100644
@@ -151,7 +151,6 @@ override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 ifeq ($(VERBOSE),1)
   Q =
   print_compile =
-  print_app_build =
   print_fpic_compile =
   print_shared_lib_compile =
   print_plugin_obj_compile =
@@ -160,7 +159,6 @@ ifeq ($(VERBOSE),1)
 else
   Q = @
   print_compile =		echo '  CC       '$(OBJ);
-  print_app_build =		echo '  BUILD    '$(OBJ);
   print_fpic_compile =		echo '  CC FPIC  '$(OBJ);
   print_shared_lib_compile =	echo '  BUILD    SHARED LIB '$(OBJ);
   print_plugin_obj_compile =	echo '  CC FPIC  '$(OBJ);
@@ -173,10 +171,6 @@ do_fpic_compile =					\
 	($(print_fpic_compile)				\
 	$(CC) -c $(CFLAGS) $(EXT) -fPIC $< -o $@)
 
-do_app_build =						\
-	($(print_app_build)				\
-	$(CC) $^ -rdynamic -o $@ $(CONFIG_LIBS) $(LIBS))
-
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
 	$(CC) --shared $^ -o $@)
Signature · 1 line
1.8.3.1
#6 lore raw

[tip:perf/core] tools lib traceevent: Remove print_app_build variable

tools lib traceevent: Remove print_app_build variable
Commit-ID:  db72a330587e10d6b8009e0dcf3d97aa9b1e2659
Gitweb:     http://git.kernel.org/tip/db72a330587e10d6b8009e0dcf3d97aa9b1e2659
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 19 Dec 2013 14:42:01 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 19 Dec 2013 16:18:09 -0300

tools lib traceevent: Remove print_app_build variable

Removing print_app_build variable, because it's not needed.

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 6 ------
 1 file changed, 6 deletions(-)
tools/lib/traceevent/Makefile +0 -6
index 0d9cbb4..022c987 100644
@@ -151,7 +151,6 @@ override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 ifeq ($(VERBOSE),1)
   Q =
   print_compile =
-  print_app_build =
   print_fpic_compile =
   print_shared_lib_compile =
   print_plugin_obj_compile =
@@ -160,7 +159,6 @@ ifeq ($(VERBOSE),1)
 else
   Q = @
   print_compile =		echo '  CC       '$(OBJ);
-  print_app_build =		echo '  BUILD    '$(OBJ);
   print_fpic_compile =		echo '  CC FPIC  '$(OBJ);
   print_shared_lib_compile =	echo '  BUILD    SHARED LIB '$(OBJ);
   print_plugin_obj_compile =	echo '  CC FPIC  '$(OBJ);
@@ -173,10 +171,6 @@ do_fpic_compile =					\
 	($(print_fpic_compile)				\
 	$(CC) -c $(CFLAGS) $(EXT) -fPIC $< -o $@)
 
-do_app_build =						\
-	($(print_app_build)				\
-	$(CC) $^ -rdynamic -o $@ $(CONFIG_LIBS) $(LIBS))
-
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
 	$(CC) --shared $^ -o $@)
author
#7 lore raw

PATCH 4/9 tools lib traceevent: Use global QUIET_CC build output

In reply to Jiri Olsa

Using global QUIET_CC build output variable and getting rid of local print_compile.

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/lib/traceevent/Makefile | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
tools/lib/traceevent/Makefile +5 -8
index 022c987..e852a8d 100644
@@ -67,6 +67,8 @@ PLUGIN_DIR = -DPLUGIN_DIR="$(DESTDIR)/$(plugin_dir)"
 PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
 endif
 
+include $(if $(BUILD_SRC),$(BUILD_SRC)/)../../scripts/Makefile.include
+
 # copy a bit from Linux kbuild
 
 ifeq ("$(origin V)", "command line")
@@ -150,7 +152,6 @@ override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 
 ifeq ($(VERBOSE),1)
   Q =
-  print_compile =
   print_fpic_compile =
   print_shared_lib_compile =
   print_plugin_obj_compile =
@@ -158,7 +159,6 @@ ifeq ($(VERBOSE),1)
   print_install =
 else
   Q = @
-  print_compile =		echo '  CC       '$(OBJ);
   print_fpic_compile =		echo '  CC FPIC  '$(OBJ);
   print_shared_lib_compile =	echo '  BUILD    SHARED LIB '$(OBJ);
   print_plugin_obj_compile =	echo '  CC FPIC  '$(OBJ);
@@ -188,16 +188,13 @@ do_build_static_lib =				\
 	$(RM) $@;  $(AR) rcs $@ $^)
 
 
-define do_compile
-	$(print_compile)						\
-	$(CC) -c $(CFLAGS) $(EXT) $< -o $(obj)/$@;
-endef
+do_compile = $(QUIET_CC)$(CC) -c $(CFLAGS) $(EXT) $< -o $(obj)/$@;
 
 $(obj)/%.o: $(src)/%.c
-	$(Q)$(call do_compile)
+	$(call do_compile)
 
 %.o: $(src)/%.c
-	$(Q)$(call do_compile)
+	$(call do_compile)
 
 PEVENT_LIB_OBJS  = event-parse.o
 PEVENT_LIB_OBJS += event-plugin.o
Signature · 1 line
1.8.3.1
#8 lore raw

[tip:perf/core] tools lib traceevent: Use global QUIET_CC build output

tools lib traceevent: Use global QUIET_CC build output
Commit-ID:  c3d090f498a4d7a8905c92dbf83ae2aa4810fbef
Gitweb:     http://git.kernel.org/tip/c3d090f498a4d7a8905c92dbf83ae2aa4810fbef
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 19 Dec 2013 14:42:02 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 19 Dec 2013 16:18:09 -0300

tools lib traceevent: Use global QUIET_CC build output

Using global QUIET_CC build output variable and getting rid of local print_compile.

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
tools/lib/traceevent/Makefile +5 -8
index 022c987..e852a8d 100644
@@ -67,6 +67,8 @@ PLUGIN_DIR = -DPLUGIN_DIR="$(DESTDIR)/$(plugin_dir)"
 PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
 endif
 
+include $(if $(BUILD_SRC),$(BUILD_SRC)/)../../scripts/Makefile.include
+
 # copy a bit from Linux kbuild
 
 ifeq ("$(origin V)", "command line")
@@ -150,7 +152,6 @@ override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 
 ifeq ($(VERBOSE),1)
   Q =
-  print_compile =
   print_fpic_compile =
   print_shared_lib_compile =
   print_plugin_obj_compile =
@@ -158,7 +159,6 @@ ifeq ($(VERBOSE),1)
   print_install =
 else
   Q = @
-  print_compile =		echo '  CC       '$(OBJ);
   print_fpic_compile =		echo '  CC FPIC  '$(OBJ);
   print_shared_lib_compile =	echo '  BUILD    SHARED LIB '$(OBJ);
   print_plugin_obj_compile =	echo '  CC FPIC  '$(OBJ);
@@ -188,16 +188,13 @@ do_build_static_lib =				\
 	$(RM) $@;  $(AR) rcs $@ $^)
 
 
-define do_compile
-	$(print_compile)						\
-	$(CC) -c $(CFLAGS) $(EXT) $< -o $(obj)/$@;
-endef
+do_compile = $(QUIET_CC)$(CC) -c $(CFLAGS) $(EXT) $< -o $(obj)/$@;
 
 $(obj)/%.o: $(src)/%.c
-	$(Q)$(call do_compile)
+	$(call do_compile)
 
 %.o: $(src)/%.c
-	$(Q)$(call do_compile)
+	$(call do_compile)
 
 PEVENT_LIB_OBJS  = event-parse.o
 PEVENT_LIB_OBJS += event-plugin.o
author
#9 lore raw

PATCH 5/9 tools lib traceevent: Add global QUIET_CC_FPIC build output

In reply to Jiri Olsa

Adding global QUIET_CC_FPIC build output variable and getting rid of local print_fpic_compile and print_plugin_obj_compile.

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/lib/traceevent/Makefile  | 16 ++--------------
 tools/scripts/Makefile.include |  1 +
 2 files changed, 3 insertions(+), 14 deletions(-)
tools/lib/traceevent/Makefile +2 -14
index e852a8d..24203cc 100644
@@ -152,33 +152,21 @@ override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 
 ifeq ($(VERBOSE),1)
   Q =
-  print_fpic_compile =
   print_shared_lib_compile =
-  print_plugin_obj_compile =
   print_plugin_build =
   print_install =
 else
   Q = @
-  print_fpic_compile =		echo '  CC FPIC  '$(OBJ);
   print_shared_lib_compile =	echo '  BUILD    SHARED LIB '$(OBJ);
-  print_plugin_obj_compile =	echo '  CC FPIC  '$(OBJ);
   print_plugin_build =		echo '  BUILD    PLUGIN '$(OBJ);
   print_static_lib_build =	echo '  BUILD    STATIC LIB '$(OBJ);
   print_install =		echo '  INSTALL  '$1;
 endif
 
-do_fpic_compile =					\
-	($(print_fpic_compile)				\
-	$(CC) -c $(CFLAGS) $(EXT) -fPIC $< -o $@)
-
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
 	$(CC) --shared $^ -o $@)
 
-do_compile_plugin_obj =				\
-	($(print_plugin_obj_compile)		\
-	$(CC) -c $(CFLAGS) -fPIC -o $@ $<)
-
 do_plugin_build =				\
 	($(print_plugin_build)			\
 	$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<)
@@ -236,10 +224,10 @@ libtraceevent.a: $(PEVENT_LIB_OBJS)
 plugins: $(PLUGINS)
 
 $(PEVENT_LIB_OBJS): %.o: $(src)/%.c TRACEEVENT-CFLAGS
-	$(Q)$(do_fpic_compile)
+	$(QUIET_CC_FPIC)$(CC) -c $(CFLAGS) $(EXT) -fPIC $< -o $@
 
 $(PLUGIN_OBJS): %.o : $(src)/%.c
-	$(Q)$(do_compile_plugin_obj)
+	$(QUIET_CC_FPIC)$(CC) -c $(CFLAGS) -fPIC -o $@ $<
 
 $(PLUGINS): %.so: %.o
 	$(Q)$(do_plugin_build)
tools/scripts/Makefile.include +1 -0
index e4cfbed..8abbef1 100644
@@ -61,6 +61,7 @@ QUIET_SUBDIR1  =
 ifneq ($(findstring $(MAKEFLAGS),s),s)
   ifneq ($(V),1)
 	QUIET_CC       = @echo '  CC       '$@;
+	QUIET_CC_FPIC  = @echo '  CC FPIC  '$@;
 	QUIET_AR       = @echo '  AR       '$@;
 	QUIET_LINK     = @echo '  LINK     '$@;
 	QUIET_MKDIR    = @echo '  MKDIR    '$@;
Signature · 1 line
1.8.3.1
#10 lore raw

[tip:perf/core] tools lib traceevent: Add global QUIET_CC_FPIC build output

tools lib traceevent: Add global QUIET_CC_FPIC build output
Commit-ID:  bdebbacd421184234b5551c468e53956a9b6edf5
Gitweb:     http://git.kernel.org/tip/bdebbacd421184234b5551c468e53956a9b6edf5
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 19 Dec 2013 14:42:03 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 19 Dec 2013 16:18:10 -0300

tools lib traceevent: Add global QUIET_CC_FPIC build output

Adding global QUIET_CC_FPIC build output variable and getting rid of local print_fpic_compile and print_plugin_obj_compile.

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile  | 16 ++--------------
 tools/scripts/Makefile.include |  1 +
 2 files changed, 3 insertions(+), 14 deletions(-)
tools/lib/traceevent/Makefile +2 -14
index e852a8d..24203cc 100644
@@ -152,33 +152,21 @@ override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 
 ifeq ($(VERBOSE),1)
   Q =
-  print_fpic_compile =
   print_shared_lib_compile =
-  print_plugin_obj_compile =
   print_plugin_build =
   print_install =
 else
   Q = @
-  print_fpic_compile =		echo '  CC FPIC  '$(OBJ);
   print_shared_lib_compile =	echo '  BUILD    SHARED LIB '$(OBJ);
-  print_plugin_obj_compile =	echo '  CC FPIC  '$(OBJ);
   print_plugin_build =		echo '  BUILD    PLUGIN '$(OBJ);
   print_static_lib_build =	echo '  BUILD    STATIC LIB '$(OBJ);
   print_install =		echo '  INSTALL  '$1;
 endif
 
-do_fpic_compile =					\
-	($(print_fpic_compile)				\
-	$(CC) -c $(CFLAGS) $(EXT) -fPIC $< -o $@)
-
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
 	$(CC) --shared $^ -o $@)
 
-do_compile_plugin_obj =				\
-	($(print_plugin_obj_compile)		\
-	$(CC) -c $(CFLAGS) -fPIC -o $@ $<)
-
 do_plugin_build =				\
 	($(print_plugin_build)			\
 	$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<)
@@ -236,10 +224,10 @@ libtraceevent.a: $(PEVENT_LIB_OBJS)
 plugins: $(PLUGINS)
 
 $(PEVENT_LIB_OBJS): %.o: $(src)/%.c TRACEEVENT-CFLAGS
-	$(Q)$(do_fpic_compile)
+	$(QUIET_CC_FPIC)$(CC) -c $(CFLAGS) $(EXT) -fPIC $< -o $@
 
 $(PLUGIN_OBJS): %.o : $(src)/%.c
-	$(Q)$(do_compile_plugin_obj)
+	$(QUIET_CC_FPIC)$(CC) -c $(CFLAGS) -fPIC -o $@ $<
 
 $(PLUGINS): %.so: %.o
 	$(Q)$(do_plugin_build)
tools/scripts/Makefile.include +1 -0
index e4cfbed..8abbef1 100644
@@ -61,6 +61,7 @@ QUIET_SUBDIR1  =
 ifneq ($(findstring $(MAKEFLAGS),s),s)
   ifneq ($(V),1)
 	QUIET_CC       = @echo '  CC       '$@;
+	QUIET_CC_FPIC  = @echo '  CC FPIC  '$@;
 	QUIET_AR       = @echo '  AR       '$@;
 	QUIET_LINK     = @echo '  LINK     '$@;
 	QUIET_MKDIR    = @echo '  MKDIR    '$@;
author
#11 lore raw

PATCH 6/9 tools lib traceevent: Use global QUIET_LINK build output

In reply to Jiri Olsa

Using global QUIET_LINK build output variable and getting rid of local print_static_lib_build, print_plugin_build and print_shared_lib_compile.

We no longer distinguish between shared and static library in the build message. It's differenced by the built file suffix, like:

  $ make
    ...
    LINK     libtraceevent.a
    LINK     libtraceevent.so
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/lib/traceevent/Makefile | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
tools/lib/traceevent/Makefile +3 -8
index 24203cc..51be8ab 100644
@@ -152,14 +152,9 @@ override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 
 ifeq ($(VERBOSE),1)
   Q =
-  print_shared_lib_compile =
-  print_plugin_build =
   print_install =
 else
   Q = @
-  print_shared_lib_compile =	echo '  BUILD    SHARED LIB '$(OBJ);
-  print_plugin_build =		echo '  BUILD    PLUGIN '$(OBJ);
-  print_static_lib_build =	echo '  BUILD    STATIC LIB '$(OBJ);
   print_install =		echo '  INSTALL  '$1;
 endif
 
@@ -216,10 +211,10 @@ all: all_cmd
 all_cmd: $(CMD_TARGETS)
 
 libtraceevent.so: $(PEVENT_LIB_OBJS)
-	$(Q)$(do_compile_shared_library)
+	$(QUIET_LINK)$(CC) --shared $^ -o $@
 
 libtraceevent.a: $(PEVENT_LIB_OBJS)
-	$(Q)$(do_build_static_lib)
+	$(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^
 
 plugins: $(PLUGINS)
 
@@ -230,7 +225,7 @@ $(PLUGIN_OBJS): %.o : $(src)/%.c
 	$(QUIET_CC_FPIC)$(CC) -c $(CFLAGS) -fPIC -o $@ $<
 
 $(PLUGINS): %.so: %.o
-	$(Q)$(do_plugin_build)
+	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<
 
 define make_version.h
 	(echo '/* This file is automatically generated. Do not modify. */';		\
Signature · 1 line
1.8.3.1
#12 lore raw

[tip:perf/core] tools lib traceevent: Use global QUIET_LINK build output

tools lib traceevent: Use global QUIET_LINK build output
Commit-ID:  e6262e23134f575ae07ecc25bb69ddb63caebc95
Gitweb:     http://git.kernel.org/tip/e6262e23134f575ae07ecc25bb69ddb63caebc95
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 19 Dec 2013 14:42:04 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 19 Dec 2013 16:18:10 -0300

tools lib traceevent: Use global QUIET_LINK build output

Using global QUIET_LINK build output variable and getting rid of local print_static_lib_build, print_plugin_build and print_shared_lib_compile.

We no longer distinguish between shared and static library in the build message. It's differenced by the built file suffix, like:

  $ make
    ...
    LINK     libtraceevent.a
    LINK     libtraceevent.so
Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
tools/lib/traceevent/Makefile +3 -8
index 24203cc..51be8ab 100644
@@ -152,14 +152,9 @@ override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 
 ifeq ($(VERBOSE),1)
   Q =
-  print_shared_lib_compile =
-  print_plugin_build =
   print_install =
 else
   Q = @
-  print_shared_lib_compile =	echo '  BUILD    SHARED LIB '$(OBJ);
-  print_plugin_build =		echo '  BUILD    PLUGIN '$(OBJ);
-  print_static_lib_build =	echo '  BUILD    STATIC LIB '$(OBJ);
   print_install =		echo '  INSTALL  '$1;
 endif
 
@@ -216,10 +211,10 @@ all: all_cmd
 all_cmd: $(CMD_TARGETS)
 
 libtraceevent.so: $(PEVENT_LIB_OBJS)
-	$(Q)$(do_compile_shared_library)
+	$(QUIET_LINK)$(CC) --shared $^ -o $@
 
 libtraceevent.a: $(PEVENT_LIB_OBJS)
-	$(Q)$(do_build_static_lib)
+	$(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^
 
 plugins: $(PLUGINS)
 
@@ -230,7 +225,7 @@ $(PLUGIN_OBJS): %.o : $(src)/%.c
 	$(QUIET_CC_FPIC)$(CC) -c $(CFLAGS) -fPIC -o $@ $<
 
 $(PLUGINS): %.so: %.o
-	$(Q)$(do_plugin_build)
+	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<
 
 define make_version.h
 	(echo '/* This file is automatically generated. Do not modify. */';		\
author
#13 lore raw

PATCH 7/9 tools lib traceevent: Use global QUIET_INSTALL build output

In reply to Jiri Olsa

Using global QUIET_INSTALL build output variable and factoring plugins installation so we could have only single install message for plugins:
INSTALL trace_plugins

Getting rid of local print_install.

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/lib/traceevent/Makefile | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
tools/lib/traceevent/Makefile +11 -10
index 51be8ab..8ea4368 100644
@@ -152,10 +152,8 @@ override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 
 ifeq ($(VERBOSE),1)
   Q =
-  print_install =
 else
   Q = @
-  print_install =		echo '  INSTALL  '$1;
 endif
 
 do_compile_shared_library =			\
@@ -307,22 +305,25 @@ TAGS:	force
 	--regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/'
 
 define do_install
-	$(print_install)				\
 	if [ ! -d '$(DESTDIR_SQ)$2' ]; then		\
 		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2';	\
 	fi;						\
 	$(INSTALL) $1 '$(DESTDIR_SQ)$2'
 endef
 
-install_lib: all_cmd install_plugins
-	$(Q)$(call do_install,$(LIB_FILE),$(bindir_SQ))
-
-PLUGINS_INSTALL = $(subst .so,.install,$(PLUGINS))
+define do_install_plugins
+	for plugin in $1; do				\
+	  $(call do_install,$$plugin,$(plugin_dir_SQ));	\
+	done
+endef
 
-$(PLUGINS_INSTALL): %.install : %.so force
-	$(Q)$(call do_install,$<,$(plugin_dir_SQ))
+install_lib: all_cmd install_plugins
+	$(call QUIET_INSTALL, $(LIB_FILE)) \
+		$(call do_install,$(LIB_FILE),$(bindir_SQ))
 
-install_plugins: $(PLUGINS_INSTALL)
+install_plugins: $(PLUGINS)
+	$(call QUIET_INSTALL, trace_plugins) \
+		$(call do_install_plugins, $(PLUGINS))
 
 install: install_lib
 
Signature · 1 line
1.8.3.1
#14 lore raw

[tip:perf/core] tools lib traceevent: Use global QUIET_INSTALL build output

tools lib traceevent: Use global QUIET_INSTALL build output
Commit-ID:  02a82c7bcd353b8cc4d4f8b3c872b527fbac7c31
Gitweb:     http://git.kernel.org/tip/02a82c7bcd353b8cc4d4f8b3c872b527fbac7c31
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 19 Dec 2013 14:42:05 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 19 Dec 2013 16:18:11 -0300

tools lib traceevent: Use global QUIET_INSTALL build output

Using global QUIET_INSTALL build output variable and factoring plugins installation so we could have only single install message for plugins:

INSTALL trace_plugins

Getting rid of local print_install.

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
tools/lib/traceevent/Makefile +11 -10
index 51be8ab..8ea4368 100644
@@ -152,10 +152,8 @@ override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 
 ifeq ($(VERBOSE),1)
   Q =
-  print_install =
 else
   Q = @
-  print_install =		echo '  INSTALL  '$1;
 endif
 
 do_compile_shared_library =			\
@@ -307,22 +305,25 @@ TAGS:	force
 	--regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/'
 
 define do_install
-	$(print_install)				\
 	if [ ! -d '$(DESTDIR_SQ)$2' ]; then		\
 		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2';	\
 	fi;						\
 	$(INSTALL) $1 '$(DESTDIR_SQ)$2'
 endef
 
-install_lib: all_cmd install_plugins
-	$(Q)$(call do_install,$(LIB_FILE),$(bindir_SQ))
-
-PLUGINS_INSTALL = $(subst .so,.install,$(PLUGINS))
+define do_install_plugins
+	for plugin in $1; do				\
+	  $(call do_install,$$plugin,$(plugin_dir_SQ));	\
+	done
+endef
 
-$(PLUGINS_INSTALL): %.install : %.so force
-	$(Q)$(call do_install,$<,$(plugin_dir_SQ))
+install_lib: all_cmd install_plugins
+	$(call QUIET_INSTALL, $(LIB_FILE)) \
+		$(call do_install,$(LIB_FILE),$(bindir_SQ))
 
-install_plugins: $(PLUGINS_INSTALL)
+install_plugins: $(PLUGINS)
+	$(call QUIET_INSTALL, trace_plugins) \
+		$(call do_install_plugins, $(PLUGINS))
 
 install: install_lib
 
author
#15 lore raw

PATCH 8/9 tools lib traceevent: Use global QUIET_CLEAN build output

In reply to Jiri Olsa

Using global QUIET_CLEAN build output variable and so we could have only single clean message:
CLEAN libtraceevent

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/lib/traceevent/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +3 -2
index 8ea4368..3496c9c 100644
@@ -328,8 +328,9 @@ install_plugins: $(PLUGINS)
 install: install_lib
 
 clean:
-	$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d
-	$(RM) TRACEEVENT-CFLAGS tags TAGS
+	$(call QUIET_CLEAN, libtraceevent) \
+		$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d \
+		$(RM) TRACEEVENT-CFLAGS tags TAGS
 
 endif # skip-makefile
 
Signature · 1 line
1.8.3.1
#16 lore raw

[tip:perf/core] tools lib traceevent: Use global QUIET_CLEAN build output

tools lib traceevent: Use global QUIET_CLEAN build output
Commit-ID:  4a953c716af285c94432e2d303ca5ee8f66129c0
Gitweb:     http://git.kernel.org/tip/4a953c716af285c94432e2d303ca5ee8f66129c0
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 19 Dec 2013 14:42:06 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 19 Dec 2013 16:18:11 -0300

tools lib traceevent: Use global QUIET_CLEAN build output

Using global QUIET_CLEAN build output variable and so we could have only single clean message:

CLEAN libtraceevent

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +3 -2
index 8ea4368..3496c9c 100644
@@ -328,8 +328,9 @@ install_plugins: $(PLUGINS)
 install: install_lib
 
 clean:
-	$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d
-	$(RM) TRACEEVENT-CFLAGS tags TAGS
+	$(call QUIET_CLEAN, libtraceevent) \
+		$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d \
+		$(RM) TRACEEVENT-CFLAGS tags TAGS
 
 endif # skip-makefile
 
author
#17 lore raw

PATCH 9/9 tools lib traceevent: Use global 'O' processing code

In reply to Jiri Olsa

Using global 'O' processing code because it's already setup due to the scripts/Makefile.include include.

Using global variable OUTPUT instead of the local
BUILD_OUTPUT.

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/lib/traceevent/Makefile | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
tools/lib/traceevent/Makefile +4 -9
index 3496c9c..ca4ab78 100644
@@ -83,18 +83,13 @@ ifeq ("$(origin O)", "command line")
 endif
 
 ifeq ($(BUILD_SRC),)
-ifneq ($(BUILD_OUTPUT),)
+ifneq ($(OUTPUT),)
 
 define build_output
-	$(if $(VERBOSE:1=),@)+$(MAKE) -C $(BUILD_OUTPUT) 	\
-	BUILD_SRC=$(CURDIR) -f $(CURDIR)/Makefile $1
+	$(if $(VERBOSE:1=),@)+$(MAKE) -C $(OUTPUT) \
+	BUILD_SRC=$(CURDIR)/ -f $(CURDIR)/Makefile $1
 endef
 
-saved-output := $(BUILD_OUTPUT)
-BUILD_OUTPUT := $(shell cd $(BUILD_OUTPUT) && /bin/pwd)
-$(if $(BUILD_OUTPUT),, \
-     $(error output directory "$(saved-output)" does not exist))
-
 all: sub-make
 
 $(MAKECMDGOALS): sub-make
@@ -106,7 +101,7 @@ sub-make: force
 # Leave processing to above invocation of make
 skip-makefile := 1
 
-endif # BUILD_OUTPUT
+endif # OUTPUT
 endif # BUILD_SRC
 
 # We process the rest of the Makefile if this is the final invocation of make
Signature · 1 line
1.8.3.1
#18 lore raw

[tip:perf/core] tools lib traceevent: Use global 'O' processing code

tools lib traceevent: Use global 'O' processing code
Commit-ID:  4c7aafc950178cd78f8cbda916ee8208afe039b5
Gitweb:     http://git.kernel.org/tip/4c7aafc950178cd78f8cbda916ee8208afe039b5
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 19 Dec 2013 14:42:07 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 19 Dec 2013 16:18:12 -0300

tools lib traceevent: Use global 'O' processing code

Using global 'O' processing code because it's already setup due to the scripts/Makefile.include include.

Using global variable OUTPUT instead of the local BUILD_OUTPUT.

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
tools/lib/traceevent/Makefile +4 -9
index 3496c9c..ca4ab78 100644
@@ -83,18 +83,13 @@ ifeq ("$(origin O)", "command line")
 endif
 
 ifeq ($(BUILD_SRC),)
-ifneq ($(BUILD_OUTPUT),)
+ifneq ($(OUTPUT),)
 
 define build_output
-	$(if $(VERBOSE:1=),@)+$(MAKE) -C $(BUILD_OUTPUT) 	\
-	BUILD_SRC=$(CURDIR) -f $(CURDIR)/Makefile $1
+	$(if $(VERBOSE:1=),@)+$(MAKE) -C $(OUTPUT) \
+	BUILD_SRC=$(CURDIR)/ -f $(CURDIR)/Makefile $1
 endef
 
-saved-output := $(BUILD_OUTPUT)
-BUILD_OUTPUT := $(shell cd $(BUILD_OUTPUT) && /bin/pwd)
-$(if $(BUILD_OUTPUT),, \
-     $(error output directory "$(saved-output)" does not exist))
-
 all: sub-make
 
 $(MAKECMDGOALS): sub-make
@@ -106,7 +101,7 @@ sub-make: force
 # Leave processing to above invocation of make
 skip-makefile := 1
 
-endif # BUILD_OUTPUT
+endif # OUTPUT
 endif # BUILD_SRC
 
 # We process the rest of the Makefile if this is the final invocation of make
author
#19 lore raw
In reply to Jiri Olsa
Quoted 4 lines · Jiri Olsa

hi,
sending out the change to introduce single:
INSTALL trace_plugins
build output line. Some more code factoring was needed.

forgot to mention tree & branch:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/traceevent_make

jirka

Quoted 35 lines

Also updated the tests/make install tests to check for installed plugins.

thanks,
jirka

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc David Ahern <[email protected]>

---
Jiri Olsa (9):
perf tests: Factor make install tests
perf tools: Making QUIET_(CLEAN|INSTAL) variables global tools lib traceevent: Remove print_app_build variable tools lib traceevent: Use global QUIET_CC build output tools lib traceevent: Add global QUIET_CC_FPIC build output tools lib traceevent: Use global QUIET_LINK build output tools lib traceevent: Use global QUIET_INSTALL build output tools lib traceevent: Use global QUIET_CLEAN build output tools lib traceevent: Use global 'O' processing code

 tools/lib/traceevent/Makefile   | 85 ++++++++++++++++++++++++++++---------------------------------------------------------
 tools/perf/config/utilities.mak |  7 -------
 tools/perf/tests/make           | 38 ++++++++++++++++++++++++++++++++------
 tools/scripts/Makefile.include  |  4 ++++
 4 files changed, 64 insertions(+), 70 deletions(-)
#20 lore raw
In reply to Jiri Olsa

Em Thu, Dec 19, 2013 at 02:41:58PM +0100, Jiri Olsa escreveu:

Quoted 7 lines

hi,
sending out the change to introduce single:
INSTALL trace_plugins
build output line. Some more code factoring was needed.

Also updated the tests/make install tests to check for installed plugins.

Ok, better now, applied, but can you take a look at:

[acme@ssdandy linux]$ make O=/tmp/build/perf -C tools/perf/ install-bin
make: Entering directory `/home/acme/git/linux/tools/perf'

  BUILD:   Doing 'make -j8' parallel build
  GEN      perf-archive
  SUBDIR   /home/acme/git/linux/tools/lib/traceevent/
make[3]: Nothing to be done for `plugins'.
make[2]: Nothing to be done for `plugins'.
  INSTALL  GTK UI
  INSTALL  binaries
  INSTALL  libexec
  INSTALL  perf-archive
  INSTALL  perl-scripts
  INSTALL  python-scripts
  INSTALL  perf_completion-script
  INSTALL  tests

make: Leaving directory `/home/acme/git/linux/tools/perf' [acme@ssdandy linux]$

Removing those two "Nothing to be done" lines, please?

- Arnaldo

author
#21 lore raw
Quoted 26 lines · Arnaldo Carvalho de Melo

Em Thu, Dec 19, 2013 at 02:41:58PM +0100, Jiri Olsa escreveu:

Quoted 7 lines

hi,
sending out the change to introduce single:
INSTALL trace_plugins
build output line. Some more code factoring was needed.

Also updated the tests/make install tests to check for installed plugins.

Ok, better now, applied, but can you take a look at:

[acme@ssdandy linux]$ make O=/tmp/build/perf -C tools/perf/ install-bin
make: Entering directory `/home/acme/git/linux/tools/perf'

  BUILD:   Doing 'make -j8' parallel build
  GEN      perf-archive
  SUBDIR   /home/acme/git/linux/tools/lib/traceevent/
make[3]: Nothing to be done for `plugins'.
make[2]: Nothing to be done for `plugins'.
  INSTALL  GTK UI
  INSTALL  binaries
  INSTALL  libexec
  INSTALL  perf-archive
  INSTALL  perl-scripts
  INSTALL  python-scripts
  INSTALL  perf_completion-script
  INSTALL  tests
Quoted 4 lines

make: Leaving directory `/home/acme/git/linux/tools/perf' [acme@ssdandy linux]$

Removing those two "Nothing to be done" lines, please?

never happy, are we? ;-) looks like change below
would do.. I'll check/test more and send out.

jirka

---

tools/scripts/Makefile.include +1 -1
index 8abbef1..555de0b 100644
@@ -55,7 +55,7 @@ descend = \
 	+mkdir -p $(OUTPUT)$(1) && \
 	$(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1) $(2)
 
-QUIET_SUBDIR0  = +$(MAKE) $(COMMAND_O) -C # space to separate -C and subdir
+QUIET_SUBDIR0  = +$(MAKE) $(COMMAND_O) -s -C # space to separate -C and subdir
 QUIET_SUBDIR1  =
 
 ifneq ($(findstring $(MAKEFLAGS),s),s)
#22 lore raw

Em Thu, Dec 26, 2013 at 09:10:07PM +0100, Jiri Olsa escreveu:

Quoted 5 lines · Arnaldo Carvalho de Melo
Quoted 1 line

Removing those two "Nothing to be done" lines, please?

never happy, are we? ;-) looks like change below
would do.. I'll check/test more and send out.

Thanks! Now I'm happy! ;-)

- Arnaldo