From: Wolfgang Denk Date: Tue, 5 Oct 2010 12:08:55 +0000 (+0200) Subject: rules.mk: make sure we always create a .depend file X-Git-Tag: v2010.12-rc1~168 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b15fbd4996ee1feedb524abfff7c581d885b51df;p=oweals%2Fu-boot.git 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 Acked-by: Detlev Zundel --- diff --git a/rules.mk b/rules.mk index c1670acfb7..c2860e52af 100644 --- 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 >> $@ ; \