Application.mk: update .depend dependency for SRCS with VPATH

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
This commit is contained in:
liuhaitao 2020-05-25 17:50:26 +08:00 committed by patacongo
parent 6205eb01f2
commit 33c794ad60

View File

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