[PATCH] scripts/gdb: Use $(abspath ...) instead of $(shell cd ... && pwd)

From: Thierry Reding
Date: Fri Apr 08 2016 - 05:16:38 EST


From: Thierry Reding <treding@xxxxxxxxxx>

Avoid forking off a shell to resolve the absolute path of the output
directory when make's builtin $(abspath ...) function will do an
adequate job.

Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
---
scripts/gdb/linux/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile
index 6cf1ecf61057..d8b88e22e16a 100644
--- a/scripts/gdb/linux/Makefile
+++ b/scripts/gdb/linux/Makefile
@@ -1,6 +1,6 @@
always := gdb-scripts

-SRCTREE := $(shell cd $(srctree) && /bin/pwd)
+SRCTREE := $(abspath $(srctree))

$(obj)/gdb-scripts:
ifneq ($(KBUILD_SRC),)
--
2.8.0