linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] trace-cmd: Allow setting of the name of Python in pkgconfig
@ 2019-07-25 20:42 Patrick McLean
  2019-07-25 23:08 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McLean @ 2019-07-25 20:42 UTC (permalink / raw)
  To: linux-trace-devel

From: Patrick McLean <patrick.mclean@sony.com>

Some vendors use different names for Python in pkgconfig, this allows
the name of the Python version in pkgconfig to differ from the Python
interperter name. The default remains the Python version.

Signed-off-by: Patrick McLean <patrick.mclean@sony.com>
---
 Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 3e63e9e..3afd982 100644
--- a/Makefile
+++ b/Makefile
@@ -115,9 +115,10 @@ PYTHON		:= ctracecmd.so
 PYTHON_GUI	:= ctracecmd.so ctracecmdgui.so
 
 PYTHON_VERS ?= python
+PYTHON_PKGCONFIG_VERS ?= $(PYTHON_VERS)
 
 # Can build python?
-ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && echo y"), y)
+ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_PKGCONFIG_VERS) > /dev/null 2>&1 && echo y"), y)
 	PYTHON_PLUGINS := plugin_python.so
 	BUILD_PYTHON := $(PYTHON) $(PYTHON_PLUGINS)
 	BUILD_PYTHON_WORKS := 1
@@ -387,8 +388,8 @@ report_nopythondev: force
 	$(Q)echo
 
 ifndef NO_PYTHON
-PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_VERS)`
-PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_VERS)` \
+PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_PKGCONFIG_VERS)`
+PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_PKGCONFIG_VERS)` \
 		$(shell $(PYTHON_VERS)-config --ldflags)
 PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0`
 else
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] trace-cmd: Allow setting of the name of Python in pkgconfig
  2019-07-25 20:42 [PATCH] trace-cmd: Allow setting of the name of Python in pkgconfig Patrick McLean
@ 2019-07-25 23:08 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2019-07-25 23:08 UTC (permalink / raw)
  To: Patrick McLean; +Cc: linux-trace-devel

On Thu, 25 Jul 2019 13:42:37 -0700
Patrick McLean <chutzpah@gentoo.org> wrote:

> From: Patrick McLean <patrick.mclean@sony.com>
> 
> Some vendors use different names for Python in pkgconfig, this allows
> the name of the Python version in pkgconfig to differ from the Python
> interperter name. The default remains the Python version.

Applied. Thanks Patrick!

-- Steve

> 
> Signed-off-by: Patrick McLean <patrick.mclean@sony.com>
> ---
>  Makefile | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 3e63e9e..3afd982 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -115,9 +115,10 @@ PYTHON		:= ctracecmd.so
>  PYTHON_GUI	:= ctracecmd.so ctracecmdgui.so
>  
>  PYTHON_VERS ?= python
> +PYTHON_PKGCONFIG_VERS ?= $(PYTHON_VERS)
>  
>  # Can build python?
> -ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && echo y"), y)
> +ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_PKGCONFIG_VERS) > /dev/null 2>&1 && echo y"), y)
>  	PYTHON_PLUGINS := plugin_python.so
>  	BUILD_PYTHON := $(PYTHON) $(PYTHON_PLUGINS)
>  	BUILD_PYTHON_WORKS := 1
> @@ -387,8 +388,8 @@ report_nopythondev: force
>  	$(Q)echo
>  
>  ifndef NO_PYTHON
> -PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_VERS)`
> -PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_VERS)` \
> +PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_PKGCONFIG_VERS)`
> +PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_PKGCONFIG_VERS)` \
>  		$(shell $(PYTHON_VERS)-config --ldflags)
>  PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0`
>  else


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-25 23:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 20:42 [PATCH] trace-cmd: Allow setting of the name of Python in pkgconfig Patrick McLean
2019-07-25 23:08 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).