rules.mk: Fix dependency checks on missing .cpp an .c files

This commit is contained in:
Jan Lindemann 2006-03-03 18:26:48 +00:00 committed by Jan Lindemann
commit 0e5e71a6e7

View file

@ -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