From patchwork Thu Jul 25 20:42:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick McLean X-Patchwork-Id: 11059655 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A458A6C5 for ; Thu, 25 Jul 2019 20:42:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93DE7289E8 for ; Thu, 25 Jul 2019 20:42:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 881A928A1D; Thu, 25 Jul 2019 20:42:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C03E289E8 for ; Thu, 25 Jul 2019 20:42:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbfGYUmn (ORCPT ); Thu, 25 Jul 2019 16:42:43 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:40304 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726195AbfGYUmn (ORCPT ); Thu, 25 Jul 2019 16:42:43 -0400 Received: from chiana.gaikai.org (unknown [100.42.98.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: chutzpah) by smtp.gentoo.org (Postfix) with ESMTPSA id 1AF93348AEE for ; Thu, 25 Jul 2019 20:42:43 +0000 (UTC) From: Patrick McLean To: linux-trace-devel@vger.kernel.org Subject: [PATCH] trace-cmd: Allow setting of the name of Python in pkgconfig Date: Thu, 25 Jul 2019 13:42:37 -0700 Message-Id: <20190725204237.3864194-1-chutzpah@gentoo.org> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Patrick McLean 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 --- 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