Commit b15fbd4996ee1feedb524abfff7c581d885b51df

Authored by Wolfgang Denk
1 parent d628866474

rules.mk: make sure we always create a .depend file

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>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -27,6 +27,7 @@
27 27  
28 28 $(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS) $(HOSTSRCS)
29 29 @rm -f $@
  30 + @touch $@
30 31 @for f in $(SRCS); do \
31 32 g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
32 33 $(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \