Make dependency generation threaded.

This commit is contained in:
Jonathan Schleifer 2008-02-10 10:20:32 +01:00
parent dec011f290
commit b3bb041145

View file

@ -72,9 +72,10 @@ OBJS3 = ${OBJS2:.cxx=.o}
OBJS4 = ${OBJS3:.d=.o}
OBJS5 = ${OBJS4:.erl=.beam}
OBJS += ${OBJS5:.m=.o}
DEPS += ${OBJS:.o=.dep}
.SILENT:
.SUFFIXES: .beam .c .cc .cxx .d .erl .m
.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m
.PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean
all:
@ -94,24 +95,21 @@ depend: pre-depend ${SRCS}
test -f .deps || regen=1; \
for i in ${SRCS}; do test $$i -nt .deps && regen=1; done; \
if test x"$$regen" = x"1"; then \
list=""; \
${DEPEND_STATUS}; \
for i in ${SRCS}; do \
case $${i##*.} in \
c|cc|cxx|m) \
list="$$list $$i"; \
;; \
esac; \
done; \
if test x"$$list" != "x"; then \
if ${CPP} ${CPPFLAGS} -M $$list >.deps; then \
${DEPEND_OK}; \
else \
${DEPEND_FAILED}; \
fi; \
rm -f .deps; \
if ${MAKE} ${MFLAGS} ${DEPS}; then \
${DEPEND_OK}; \
else \
rm -f .deps; \
${DEPEND_FAILED}; \
fi; \
fi
.c.dep .cc.dep .cxx.dep .m.dep:
${CPP} ${CPPFLAGS} -M $< >>.deps
.d.dep:
pre-depend:
${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS}