aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/config/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index e05d8f99424d..75d4c237b03d 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -121,10 +121,16 @@ ifdef PARSER_DEBUG
121endif 121endif
122 122
123ifndef NO_LIBPYTHON 123ifndef NO_LIBPYTHON
124 override PYTHON := \ 124 # Try different combinations to accommodate systems that only have
125 $(call get-executable-or-default,PYTHON,python) 125 # python[2][-config] in weird combinations but always preferring
126 # python2 and python2-config as per pep-0394. If we catch a
127 # python[-config] in version 3, the version check will kill it.
128 PYTHON2 := $(if $(call get-executable,python2),python2,python)
129 override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON2))
130 PYTHON2_CONFIG := \
131 $(if $(call get-executable,$(PYTHON)-config),$(PYTHON)-config,python-config)
126 override PYTHON_CONFIG := \ 132 override PYTHON_CONFIG := \
127 $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON)-config) 133 $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON2_CONFIG))
128 134
129 PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG)) 135 PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
130 136