Cleanup .boards.depend when using an objtree
authorLoïc Minier <loic.minier@linaro.org>
Wed, 19 Jan 2011 12:16:30 +0000 (13:16 +0100)
committerWolfgang Denk <wd@denx.de>
Fri, 21 Jan 2011 07:56:50 +0000 (08:56 +0100)
.boards.depend was created in the source tree even when calling make
with O=objtree, and distclean O=objtree wouldn't clean it.  Create
.boards.depend in objtree instead as to clean it up properly.

Reported-by: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Makefile

index 7c02096f0a07c9f3f801dd8f7e30e22839cdca0f..fd21ef3cff3b35ffdd4c183a8c400136738a1376 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -525,8 +525,8 @@ unconfig:
 %_config::     unconfig
        @$(MKCONFIG) -A $(@:_config=)
 
-sinclude .boards.depend
-.boards.depend:        boards.cfg
+sinclude $(obj).boards.depend
+$(obj).boards.depend:  boards.cfg
        awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@
 
 #