diff options
| author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2016-11-22 03:30:26 -0500 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.com> | 2016-12-11 06:12:56 -0500 |
| commit | e19b7cee020441dd690613d223aed7abb0bcda81 (patch) | |
| tree | 148ac04e7634c1e9234275fe82c2f9e22333c00a /tools/objtool | |
| parent | 76bee23411f8510fbf5fc5641bae2c203b726eb6 (diff) | |
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/objtool')
| -rw-r--r-- | tools/objtool/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index 041b493ad3ab..27e019c09bd2 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile | |||
| @@ -11,12 +11,12 @@ LD = ld | |||
| 11 | AR = ar | 11 | AR = ar |
| 12 | 12 | ||
| 13 | ifeq ($(srctree),) | 13 | ifeq ($(srctree),) |
| 14 | srctree := $(patsubst %/,%,$(dir $(shell pwd))) | 14 | srctree := $(patsubst %/,%,$(dir $(CURDIR))) |
| 15 | srctree := $(patsubst %/,%,$(dir $(srctree))) | 15 | srctree := $(patsubst %/,%,$(dir $(srctree))) |
| 16 | endif | 16 | endif |
| 17 | 17 | ||
| 18 | SUBCMD_SRCDIR = $(srctree)/tools/lib/subcmd/ | 18 | SUBCMD_SRCDIR = $(srctree)/tools/lib/subcmd/ |
| 19 | LIBSUBCMD_OUTPUT = $(if $(OUTPUT),$(OUTPUT),$(PWD)/) | 19 | LIBSUBCMD_OUTPUT = $(if $(OUTPUT),$(OUTPUT),$(CURDIR)/) |
| 20 | LIBSUBCMD = $(LIBSUBCMD_OUTPUT)libsubcmd.a | 20 | LIBSUBCMD = $(LIBSUBCMD_OUTPUT)libsubcmd.a |
| 21 | 21 | ||
| 22 | OBJTOOL := $(OUTPUT)objtool | 22 | OBJTOOL := $(OUTPUT)objtool |
