Skip to contentSkip to conversation

make O=foo does not fail if foo does not exist

PATCH New Kevin P. Fleming 1 participant 1 message Sep 28, 2003 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make O=foo does not fail if foo does not exist

Simple enough... I mistyped the path to the object directory, and the build continued in the source directory anyway. This patch causes the build to stop, although with a non-obvious error message. A better fix would actually check KBUILD_OUTPUT after the cd && pwd test, but I'll leave that to you if you're so inclined.

Makefile renamed from Makefile~ +0 -0
@@ -81,7 +81,7 @@
 
 ifneq ($(KBUILD_OUTPUT),)
 # Invoke a second make in the output directory, passing relevant 

variables
- KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT); /bin/pwd)
+ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)

.PHONY: $(MAKECMDGOALS) all