public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: perf: Avoid error message when building with no python installed
@ 2015-07-27 15:50 Pawel Moll
  2015-07-27 18:36 ` Jiri Olsa
  0 siblings, 1 reply; 4+ messages in thread
From: Pawel Moll @ 2015-07-27 15:50 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Peter Zijlstra, Ingo Molnar, Jiri Olsa,
	Namhyung Kim, Adrian Hunter
  Cc: linux-kernel, Pawel Moll

When run on a system without a python interpreter installed, the makefile
probing python will try to execute

	/bin/sh -c 'command -v -config [...]'

instead of

	/bin/sh -c 'command -v python-config [...]'

resulting in the following error message:

	sh: 1: command: Illegal option -c

Although harmless, the message can be quite confusing and hard to track.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
---
 tools/perf/config/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 094ddae..b4a9c29 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -150,7 +150,7 @@ ifndef NO_LIBPYTHON
   PYTHON2 := $(if $(call get-executable,python2),python2,python)
   override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON2))
   PYTHON2_CONFIG := \
-    $(if $(call get-executable,$(PYTHON)-config),$(PYTHON)-config,python-config)
+    $(if $(PYTHON),$(if $(call get-executable,$(PYTHON)-config),$(PYTHON)-config,python-config))
   override PYTHON_CONFIG := \
     $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON2_CONFIG))
 
-- 
2.1.4


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

end of thread, other threads:[~2015-07-28 13:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 15:50 [PATCH] tools: perf: Avoid error message when building with no python installed Pawel Moll
2015-07-27 18:36 ` Jiri Olsa
2015-07-28 12:49   ` Pawel Moll
2015-07-28 13:44     ` Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox