All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Jiri Olsa <jolsa@kernel.org>,
	Alexis Berlemont <alexis.berlemont@gmail.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>
Subject: [PATCH 14/30] perf build: Add scripts objects building
Date: Fri,  2 Jan 2015 16:35:56 +0100	[thread overview]
Message-ID: <1420212972-21595-15-git-send-email-jolsa@kernel.org> (raw)
In-Reply-To: <1420212972-21595-1-git-send-email-jolsa@kernel.org>

Move the scripts objects building under build framework
to be included in the libperf build object.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.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: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
---
 tools/perf/Build                                |  1 +
 tools/perf/Makefile.perf                        | 22 ----------------------
 tools/perf/config/Makefile                      |  7 +++++++
 tools/perf/scripts/Build                        |  2 ++
 tools/perf/scripts/perl/Perf-Trace-Util/Build   |  3 +++
 tools/perf/scripts/python/Perf-Trace-Util/Build |  3 +++
 tools/perf/util/Build                           |  2 ++
 tools/perf/util/scripting-engines/Build         |  6 ++++++
 8 files changed, 24 insertions(+), 22 deletions(-)
 create mode 100644 tools/perf/scripts/Build
 create mode 100644 tools/perf/scripts/perl/Perf-Trace-Util/Build
 create mode 100644 tools/perf/scripts/python/Perf-Trace-Util/Build
 create mode 100644 tools/perf/util/scripting-engines/Build

diff --git a/tools/perf/Build b/tools/perf/Build
index a9ff8fd0bff9..7035a51deff8 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -35,5 +35,6 @@ CFLAGS_builtin-timechart.o += $(paths)
 libperf-y += util/
 libperf-y += arch/
 libperf-y += ui/
+libperf-$(CONFIG_SCRIPT) += scripts/
 
 gtk-y += ui/gtk/
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 686e28073898..9793dd61931e 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -349,16 +349,6 @@ install-gtk: $(OUTPUT)libperf-gtk.so
 		$(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)'
 endif
 
-ifndef NO_LIBPERL
-  LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-perl.o
-  LIB_OBJS += $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o
-endif
-
-ifndef NO_LIBPYTHON
-  LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o
-  LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o
-endif
-
 ifeq ($(NO_PERF_REGS),0)
   ifeq ($(ARCH),x86)
     LIB_H += arch/x86/include/perf_regs.h
@@ -460,18 +450,6 @@ $(OUTPUT)%.o: %.S
 $(OUTPUT)%.s: %.S
 	$(QUIET_CC)$(CC) -o $@ -E $(CFLAGS) $<
 
-$(OUTPUT)util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c $(OUTPUT)PERF-CFLAGS
-	$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default $<
-
-$(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o: scripts/perl/Perf-Trace-Util/Context.c $(OUTPUT)PERF-CFLAGS
-	$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default $<
-
-$(OUTPUT)util/scripting-engines/trace-event-python.o: util/scripting-engines/trace-event-python.c $(OUTPUT)PERF-CFLAGS
-	$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow $<
-
-$(OUTPUT)scripts/python/Perf-Trace-Util/Context.o: scripts/python/Perf-Trace-Util/Context.c $(OUTPUT)PERF-CFLAGS
-	$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs $<
-
 $(OUTPUT)perf-%: %.o $(PERFLIBS)
 	$(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(filter %.o,$^) $(LIBS)
 
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index b1320ef2ca9b..9392ce9d2e63 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -512,6 +512,8 @@ else
   else
     LDFLAGS += $(PERL_EMBED_LDFLAGS)
     EXTLIBS += $(PERL_EMBED_LIBADD)
+    $(call detected,CONFIG_LIBPERL)
+    CONFIG_SCRIPT := y
   endif
 endif
 
@@ -571,6 +573,8 @@ else
           LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
           EXTLIBS += $(PYTHON_EMBED_LIBADD)
           LANG_BINDINGS += $(obj-perf)python/perf.so
+          $(call detected,CONFIG_LIBPYTHON)
+          CONFIG_SCRIPT := y
         endif
       endif
     endif
@@ -840,3 +844,6 @@ $(call detected_var,ETC_PERFCONFIG_SQ)
 $(call detected_var,prefix_SQ)
 $(call detected_var,LIBDIR)
 $(call detected_var,GTK_CFLAGS)
+$(call detected_var,PERL_EMBED_CCOPTS)
+$(call detected_var,PYTHON_EMBED_CCOPTS)
+$(call detected_var,CONFIG_SCRIPT)
diff --git a/tools/perf/scripts/Build b/tools/perf/scripts/Build
new file mode 100644
index 000000000000..41efd7e368b3
--- /dev/null
+++ b/tools/perf/scripts/Build
@@ -0,0 +1,2 @@
+libperf-$(CONFIG_LIBPERL)   += perl/Perf-Trace-Util/
+libperf-$(CONFIG_LIBPYTHON) += python/Perf-Trace-Util/
diff --git a/tools/perf/scripts/perl/Perf-Trace-Util/Build b/tools/perf/scripts/perl/Perf-Trace-Util/Build
new file mode 100644
index 000000000000..928e110179cb
--- /dev/null
+++ b/tools/perf/scripts/perl/Perf-Trace-Util/Build
@@ -0,0 +1,3 @@
+libperf-y += Context.o
+
+CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default
diff --git a/tools/perf/scripts/python/Perf-Trace-Util/Build b/tools/perf/scripts/python/Perf-Trace-Util/Build
new file mode 100644
index 000000000000..aefc15c9444a
--- /dev/null
+++ b/tools/perf/scripts/python/Perf-Trace-Util/Build
@@ -0,0 +1,3 @@
+libperf-y += Context.o
+
+CFLAGS_Context.o += $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 0302566002f5..a9e7a97ea7b7 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -88,6 +88,8 @@ libperf-$(CONFIG_DWARF) += dwarf-aux.o
 libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
 libperf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o
 
+libperf-$(CONFIG_SCRIPT) += scripting-engines/
+
 CFLAGS_config.o   += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
 CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
 
diff --git a/tools/perf/util/scripting-engines/Build b/tools/perf/util/scripting-engines/Build
new file mode 100644
index 000000000000..6516e220c247
--- /dev/null
+++ b/tools/perf/util/scripting-engines/Build
@@ -0,0 +1,6 @@
+libperf-$(CONFIG_LIBPERL)   += trace-event-perl.o
+libperf-$(CONFIG_LIBPYTHON) += trace-event-python.o
+
+CFLAGS_trace-event-perl.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default
+
+CFLAGS_trace-event-python.o += $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow
-- 
1.9.3


  parent reply	other threads:[~2015-01-02 15:41 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-02 15:35 [RFC/PATCHSET 00/30] perf tools: New build framework Jiri Olsa
2015-01-02 15:35 ` [PATCH 01/30] perf tools: Add new build framework support Jiri Olsa
2015-01-05 10:57   ` Borislav Petkov
2015-01-05 11:13     ` Jiri Olsa
2015-01-06 13:41       ` Arnaldo Carvalho de Melo
2015-01-06 14:06         ` Jiri Olsa
2015-01-08  6:18   ` Namhyung Kim
2015-01-08 14:45     ` Jiri Olsa
2015-01-02 15:35 ` [PATCH 02/30] perf build: Add detected config " Jiri Olsa
2015-01-02 15:35 ` [PATCH 03/30] perf build: Add subdir " Jiri Olsa
2015-01-02 15:35 ` [PATCH 04/30] perf build: Add bench objects building Jiri Olsa
2015-01-02 15:35 ` [PATCH 05/30] perf build: Add tests " Jiri Olsa
2015-01-02 15:35 ` [PATCH 06/30] perf build: Add builtin " Jiri Olsa
2015-01-02 15:35 ` [PATCH 07/30] perf build: Add libperf " Jiri Olsa
2015-01-08  6:15   ` Namhyung Kim
2015-01-08 14:45     ` Jiri Olsa
2015-01-02 15:35 ` [PATCH 08/30] perf build: Add probe " Jiri Olsa
2015-01-02 15:35 ` [PATCH 09/30] perf build: Add dwarf " Jiri Olsa
2015-01-02 15:35 ` [PATCH 10/30] perf build: Add dwarf unwind " Jiri Olsa
2015-01-02 15:35 ` [PATCH 11/30] perf build: Add ui " Jiri Olsa
2015-01-02 15:35 ` [PATCH 12/30] perf build: Add slang " Jiri Olsa
2015-01-02 15:35 ` [PATCH 13/30] perf build: Add gtk " Jiri Olsa
2015-01-02 15:35 ` Jiri Olsa [this message]
2015-01-02 15:35 ` [PATCH 15/30] perf build: Add perf regs " Jiri Olsa
2015-01-02 15:35 ` [PATCH 16/30] perf build: Add zlib " Jiri Olsa
2015-01-02 15:35 ` [PATCH 17/30] perf build: Add perf.o object building Jiri Olsa
2015-01-02 15:36 ` [PATCH 18/30] perf build: Add arch x86 objects building Jiri Olsa
2015-01-02 15:36 ` [PATCH 19/30] perf build: Add arch arm " Jiri Olsa
2015-01-02 15:36 ` [PATCH 20/30] perf build: Add arch arm64 " Jiri Olsa
2015-01-02 15:36 ` [PATCH 21/30] perf build: Add arch powerpc " Jiri Olsa
2015-01-02 15:36 ` [PATCH 22/30] perf build: Add arch s390 " Jiri Olsa
2015-01-02 15:36 ` [PATCH 23/30] perf build: Add arch sh " Jiri Olsa
2015-01-02 15:36 ` [PATCH 24/30] perf build: Add arch sparc " Jiri Olsa
2015-01-02 15:36 ` [PATCH 25/30] perf build: Add single target build framework support Jiri Olsa
2015-01-02 15:36 ` [PATCH 26/30] perf make: Remove directory dependency rules Jiri Olsa
2015-01-02 15:36 ` [PATCH 27/30] perf make: Remove uneeded variables Jiri Olsa
2015-01-02 15:36 ` [PATCH 28/30] perf make: Remove PERF-CFLAGS file Jiri Olsa
2015-01-02 15:36 ` [PATCH 29/30] perf tools: Add support to configure builtin commands inclusion Jiri Olsa
2015-01-08  7:15   ` Namhyung Kim
2015-01-08 14:44     ` Jiri Olsa
2015-01-02 15:36 ` [PATCH 30/30] perf tools: Disable test code Jiri Olsa
2015-01-02 16:29   ` David Ahern
2015-01-02 17:36 ` [RFC/PATCHSET 00/30] perf tools: New build framework Ingo Molnar
2015-01-04 15:49   ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420212972-21595-15-git-send-email-jolsa@kernel.org \
    --to=jolsa@kernel.org \
    --cc=acme@redhat.com \
    --cc=alexis.berlemont@gmail.com \
    --cc=bp@alien8.de \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.