From 0e5e71a6e767dacc87be2af5859b98df12e0a490 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Fri, 3 Mar 2006 18:26:48 +0000 Subject: [PATCH] rules.mk: Fix dependency checks on missing .cpp an .c files --- make/rules.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/make/rules.mk b/make/rules.mk index 04ddf8c6..d6a936dd 100644 --- a/make/rules.mk +++ b/make/rules.mk @@ -187,8 +187,10 @@ endif #depend.mk: $(SRC_ALL_CPP) # > $@ && makedepend -f depend.mk -- $(CPPFLAGS) $(DEPEND_CPPFLAGS) -- $(SRC_ALL_CPP) 2>&1 | sed '/non-portable whitespace/ d' -depend.mk: $(SRC_ALL_CPP) - > $@ && gcc -M $(CPPFLAGS) $(DEPEND_CPPFLAGS) $(filter-out %.h,$(SRC_ALL_CPP)) -o $@ +depend.mk: $(filter-out %.h, $(SRC_ALL_CPP) $(PREREQ_DONE)) + > $@ && if [ "$(wildcard *.cpp *.c)" ]; then \ + gcc -M $(CPPFLAGS) $(DEPEND_CPPFLAGS) $(filter-out %.h,$(SRC_ALL_CPP)) -o $@; \ + fi depend: depend.mk