Skip to content
Snippets Groups Projects
Commit b15fbd49 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

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: default avatarWolfgang Denk <wd@denx.de>
Acked-by: default avatarDetlev Zundel <dzu@denx.de>
parent d6288664
No related branches found
No related tags found
No related merge requests found
......@@ -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 >> $@ ; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment