changeset 2374:179821cb7dca

Fix a possible bug in dependency generation.
author Jonathan Schleifer <js-audacious@webkeks.org>
date Sun, 10 Feb 2008 10:36:22 +0100
parents 77cd6da06def
children e84c4ee208ca
files buildsys.mk.in
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/buildsys.mk.in	Sun Feb 10 10:29:56 2008 +0100
+++ b/buildsys.mk.in	Sun Feb 10 10:36:22 2008 +0100
@@ -98,15 +98,17 @@
 		${DEPEND_STATUS}; \
 		rm -f .deps; \
 		if ${MAKE} ${MFLAGS} ${DEPS}; then \
+			cat ${DEPS} >.deps; \
+			rm -f ${DEPS}; \
 			${DEPEND_OK}; \
 		else \
-			rm -f .deps; \
+			rm -f .deps ${DEPS}; \
 			${DEPEND_FAILED}; \
 		fi; \
 	fi
 
 .c.dep .cc.dep .cxx.dep .m.dep:
-	${CPP} ${CPPFLAGS} -M $< >>.deps
+	${CPP} ${CPPFLAGS} -M $< >$@
 
 .d.dep:
 
@@ -352,7 +354,7 @@
 		${DIR_LEAVE}; \
 	done
 	
-	for i in ${OBJS} ${CLEAN} ${CLEAN_LIB} .deps; do \
+	for i in ${OBJS} ${CLEAN} ${CLEAN_LIB} .deps ${DEPS}; do \
 		if test -f $$i -o -d $$i; then \
 			if rm -fr $$i; then \
 				${DELETE_OK}; \