From: Wolfgang Denk Date: Tue, 5 Oct 2010 14:08:55 +0200 Subject: [U-Boot] [PATCH] rules.mk: make sure we always create a .depend file Message-ID: <1286280535-1282-1-git-send-email-wd@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- rules.mk | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/rules.mk b/rules.mk index c1670ac..c2860e5 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 >> $@ ; \ -- 1.7.2.3