]> git.sur5r.net Git - u-boot/blobdiff - Makefile
tegra: fix Makefile to pass per-file CFLAGS
[u-boot] / Makefile
index e7232186273fae0df000761428a61a4d7c4a0c1e..e5f5a8cdc2435708a96bd128e7ec60e64d2de3f2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -124,7 +124,8 @@ ifneq ($(KBUILD_OUTPUT),)
 # Invoke a second make in the output directory, passing relevant variables
 # check that the output directory actually exists
 saved-output := $(KBUILD_OUTPUT)
-KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
+KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
+                                                               && /bin/pwd)
 $(if $(KBUILD_OUTPUT),, \
      $(error output directory "$(saved-output)" does not exist))
 
@@ -1172,7 +1173,7 @@ MRPROPER_FILES += .config .config.old \
 clean: rm-dirs  := $(CLEAN_DIRS)
 clean: rm-files := $(CLEAN_FILES)
 
-clean-dirs     := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $f/Makefile),$f))
+clean-dirs     := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $(srctree)/$f/Makefile),$f))
 
 clean-dirs      := $(addprefix _clean_, $(clean-dirs) doc/DocBook)