From e19b7cee020441dd690613d223aed7abb0bcda81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 22 Nov 2016 09:30:26 +0100 Subject: make use of make variable CURDIR instead of calling pwd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit make already provides the current working directory in a variable, so make use of it instead of forking a shell. Also replace usage of PWD by CURDIR. PWD is provided by most shells, but not all, so this makes the build system more robust. Signed-off-by: Uwe Kleine-König Signed-off-by: Michal Marek --- tools/perf/Makefile.perf | 2 +- tools/perf/tests/make | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/perf') diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 982d6439bb07..5bdef736a662 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -94,7 +94,7 @@ LC_NUMERIC=C export LC_COLLATE LC_NUMERIC ifeq ($(srctree),) -srctree := $(patsubst %/,%,$(dir $(shell pwd))) +srctree := $(patsubst %/,%,$(dir $(CURDIR))) srctree := $(patsubst %/,%,$(dir $(srctree))) #$(info Determined 'srctree' to be $(srctree)) endif diff --git a/tools/perf/tests/make b/tools/perf/tests/make index 143f4d549769..3482e9f67326 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -42,7 +42,7 @@ LC_NUMERIC=C export LC_COLLATE LC_NUMERIC ifeq ($(srctree),) -srctree := $(patsubst %/,%,$(dir $(shell pwd))) +srctree := $(patsubst %/,%,$(dir $(CURDIR))) srctree := $(patsubst %/,%,$(dir $(srctree))) #$(info Determined 'srctree' to be $(srctree)) endif -- cgit v1.2.3