aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index cea64d277457..faf55c96ba59 100644
--- a/Makefile
+++ b/Makefile
@@ -120,9 +120,10 @@ ifneq ($(KBUILD_OUTPUT),)
120# Invoke a second make in the output directory, passing relevant variables 120# Invoke a second make in the output directory, passing relevant variables
121# check that the output directory actually exists 121# check that the output directory actually exists
122saved-output := $(KBUILD_OUTPUT) 122saved-output := $(KBUILD_OUTPUT)
123KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) 123KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
124 && /bin/pwd)
124$(if $(KBUILD_OUTPUT),, \ 125$(if $(KBUILD_OUTPUT),, \
125 $(error output directory "$(saved-output)" does not exist)) 126 $(error failed to create output directory "$(saved-output)"))
126 127
127PHONY += $(MAKECMDGOALS) sub-make 128PHONY += $(MAKECMDGOALS) sub-make
128 129