summaryrefslogtreecommitdiff
path: root/tools/scripts/Makefile.include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-11-08 12:17:15 +0300
committerIngo Molnar <mingo@kernel.org>2017-11-08 12:17:15 +0300
commit8a103df440afea30c91ebd42e61dc644e647f4bd (patch)
tree2cfa99e9c6e1e138e1404bce4294e46cb0034cce /tools/scripts/Makefile.include
parenta9903f04e0a4ea522d959c2f287cdf0ab029e324 (diff)
parentfbc3edf7d7731d7a22c483c679700589bab936a3 (diff)
downloadlinux-8a103df440afea30c91ebd42e61dc644e647f4bd.tar.xz
Merge branch 'linus' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/scripts/Makefile.include')
-rw-r--r--tools/scripts/Makefile.include7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 9dc8f078a83c..654efd9768fd 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -1,7 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
ifneq ($(O),)
ifeq ($(origin O), command line)
- ABSOLUTE_O := $(realpath $(O))
- dummy := $(if $(ABSOLUTE_O),,$(error O=$(O) does not exist))
+ dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
+ ABSOLUTE_O := $(shell cd $(O) ; pwd)
OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
COMMAND_O := O=$(ABSOLUTE_O)
ifeq ($(objtree),)
@@ -12,7 +13,7 @@ endif
# check that the output directory actually exists
ifneq ($(OUTPUT),)
-OUTDIR := $(realpath $(OUTPUT))
+OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
endif