]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
rules.mk: make sure we always create a .depend file
authorWolfgang Denk <wd@denx.de>
Tue, 5 Oct 2010 12:08:55 +0000 (14:08 +0200)
committerWolfgang Denk <wd@denx.de>
Wed, 6 Oct 2010 20:19:58 +0000 (22:19 +0200)
There are some cases where "make depend" would always run when
entering a directory.  This happened when both the $(SRCS) and
$(HOSTSRCS) lists were empty (which is for example typical for the
examples/api/ directory).  Avoid this by making sure that a ".depend"
file gets always created, even if empty.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
rules.mk

index c1670acfb7ad2d240d0cb16657f4ead22ebd443f..c2860e52afb08bf2f0de5d412f9d707749f44ba0 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -27,6 +27,7 @@ _depend:      $(obj).depend
 
 $(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS) $(HOSTSRCS)
                @rm -f $@
+               @touch $@
                @for f in $(SRCS); do \
                        g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
                        $(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \