changeset 2376:e84c4ee208ca

Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author Eugene Zagidullin <e.asphyx@gmail.com>
date Sun, 10 Feb 2008 14:47:39 +0300
parents 22641735c9b1 (current diff) 179821cb7dca (diff)
children 9056897525e1
files
diffstat 1 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/buildsys.mk.in	Sun Feb 10 14:46:28 2008 +0300
+++ b/buildsys.mk.in	Sun Feb 10 14:47:39 2008 +0300
@@ -72,9 +72,10 @@
 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:
@@ -93,25 +94,24 @@
 	regen=0; \
 	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=""; \
+	if test x"$$regen" = x"1" -a x"${DEPS}" != "x"; then \
 		${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 ${CC} ${CPPFLAGS} -M $$list >.deps; then \
-				${DEPEND_OK}; \
-			else \
-				${DEPEND_FAILED}; \
-			fi; \
+		rm -f .deps; \
+		if ${MAKE} ${MFLAGS} ${DEPS}; then \
+			cat ${DEPS} >.deps; \
+			rm -f ${DEPS}; \
+			${DEPEND_OK}; \
+		else \
+			rm -f .deps ${DEPS}; \
+			${DEPEND_FAILED}; \
 		fi; \
 	fi
 
+.c.dep .cc.dep .cxx.dep .m.dep:
+	${CPP} ${CPPFLAGS} -M $< >$@
+
+.d.dep:
+
 pre-depend:
 
 ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS}
@@ -354,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}; \