Linux-Trace-Devel Archive on lore.kernel.org
 help / color / 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	[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, back to index

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

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org linux-trace-devel@archiver.kernel.org
	public-inbox-index linux-trace-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox