summaryrefslogtreecommitdiff
path: root/tools/lib/subcmd
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2016-11-22 11:30:26 +0300
committerMichal Marek <mmarek@suse.com>2016-12-11 14:12:56 +0300
commite19b7cee020441dd690613d223aed7abb0bcda81 (patch)
tree148ac04e7634c1e9234275fe82c2f9e22333c00a /tools/lib/subcmd
parent76bee23411f8510fbf5fc5641bae2c203b726eb6 (diff)
downloadlinux-e19b7cee020441dd690613d223aed7abb0bcda81.tar.xz
make use of make variable CURDIR instead of calling pwd
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 <u.kleine-koenig@pengutronix.de> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'tools/lib/subcmd')
-rw-r--r--tools/lib/subcmd/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/subcmd/Makefile b/tools/lib/subcmd/Makefile
index ce4b7e527566..3f8cc44a0dbd 100644
--- a/tools/lib/subcmd/Makefile
+++ b/tools/lib/subcmd/Makefile
@@ -2,7 +2,7 @@ include ../../scripts/Makefile.include
include ../../scripts/utilities.mak # QUIET_CLEAN
ifeq ($(srctree),)
-srctree := $(patsubst %/,%,$(dir $(shell pwd)))
+srctree := $(patsubst %/,%,$(dir $(CURDIR)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
#$(info Determined 'srctree' to be $(srctree))