package/config: create .depend in object directory
authorPeter Korsgaard <jacmet@sunsite.dk>
Mon, 21 Jun 2010 20:28:38 +0000 (22:28 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 21 Jun 2010 21:02:07 +0000 (23:02 +0200)
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/config/Makefile

index 34cc4b705d8d8cc15b0129439c2d47dbd790a984..f0a030f80934a6209544e36e503e10b00a4d94d5 100644 (file)
@@ -5,9 +5,9 @@ srctree := .
 
 include Makefile.kconfig
 #HOSTCFLAGS+=-Dinline="" -include foo.h
--include .depend
-.depend: $(wildcard *.h *.c)
-       $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > .depend 2>/dev/null || :
+-include $(obj)/.depend
+$(obj)/.depend: $(wildcard *.h *.c)
+       $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || :
 
 __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
 host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m)))