mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 11:24:42 +00:00
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>
This commit is contained in:
parent
d628866474
commit
b15fbd4996
1 changed files with 1 additions and 0 deletions
1
rules.mk
1
rules.mk
|
@ -27,6 +27,7 @@ _depend: $(obj).depend
|
||||||
|
|
||||||
$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS) $(HOSTSRCS)
|
$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS) $(HOSTSRCS)
|
||||||
@rm -f $@
|
@rm -f $@
|
||||||
|
@touch $@
|
||||||
@for f in $(SRCS); do \
|
@for f in $(SRCS); do \
|
||||||
g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
|
g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
|
||||||
$(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
|
$(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
|
||||||
|
|
Loading…
Add table
Reference in a new issue