Application.mk: fix generated empty Make.dep for SRCS with VPATH

https://github.com/apache/incubator-nuttx-apps/pull/250 resulted in generated empty
Make.dep for SRCS with VPATH.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
This commit is contained in:
liuhaitao 2020-05-21 17:39:15 +08:00 committed by Abdelatif Guettouche
parent 8d1f2d52da
commit b64d3533ba

View File

@ -220,11 +220,11 @@ else
context::
endif
.depend: Makefile $(wildcard $(SRCS))
.depend: Makefile $(SRCS)
ifeq ($(filter %$(CXXEXT),$(SRCS)),)
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(filter-out Makefile,$^) >Make.dep
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(filter-out Makefile,$(wildcard $^)) >Make.dep
else
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(filter-out Makefile,$^) >Make.dep
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(filter-out Makefile,$(wildcard $^)) >Make.dep
endif
$(Q) touch $@