Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754273AbbG0PvI (ORCPT ); Mon, 27 Jul 2015 11:51:08 -0400 Received: from foss.arm.com ([217.140.101.70]:54095 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753418AbbG0PvG (ORCPT ); Mon, 27 Jul 2015 11:51:06 -0400 From: Pawel Moll To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Jiri Olsa , Namhyung Kim , Adrian Hunter Cc: linux-kernel@vger.kernel.org, Pawel Moll Subject: [PATCH] tools: perf: Avoid error message when building with no python installed Date: Mon, 27 Jul 2015 16:50:55 +0100 Message-Id: <1438012255-26462-1-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1403 Lines: 41 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/