Mercurial > audlegacy
changeset 4749:b86e9f9663f4
Parallel dependency resolution by Jonathan Schleifer.
author | Tony Vroon <chainsaw@gentoo.org> |
---|---|
date | Wed, 30 Jul 2008 23:04:32 +0100 |
parents | 60d8d8f667ed |
children | b87f8c707b7f c6f352d25d27 278100ea0e92 |
files | buildsys.mk.in |
diffstat | 1 files changed, 27 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/buildsys.mk.in Thu Jul 31 00:32:43 2008 +0300 +++ b/buildsys.mk.in Wed Jul 30 23:04:32 2008 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, Jonathan Schleifer <js-buildsys@webkeks.org> +# Copyright (c) 2007 - 2008, Jonathan Schleifer <js-buildsys@webkeks.org> # # https://webkeks.org/hg/buildsys/ # @@ -73,11 +73,11 @@ OBJS3 = ${OBJS2:.cxx=.o} OBJS4 = ${OBJS3:.d=.o} OBJS5 = ${OBJS4:.erl=.beam} -OBJS += ${OBJS5:.m=.o} -DEPS += ${OBJS:.o=.dep} +OBJS6 = ${OBJS5:.m=.o} +OBJS += ${OBJS6:.xpm=.o} .SILENT: -.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m +.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m .xpm .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean all: @@ -94,17 +94,25 @@ depend: pre-depend ${SRCS} regen=0; \ + deps=""; \ test -f .deps || regen=1; \ - for i in ${SRCS}; do test $$i -nt .deps && regen=1; done; \ - if test x"$$regen" = x"1" -a x"${DEPS}" != "x"; then \ + for i in ${SRCS}; do \ + case $$i in \ + *.o) \ + test $$i -nt .deps && regen=1; \ + deps="$${deps%.o}.dep $$i"; \ + ;; \ + esac; \ + done; \ + if test x"$$regen" = x"1" -a x"$$deps" != "x"; then \ ${DEPEND_STATUS}; \ rm -f .deps; \ - if ${MAKE} ${MFLAGS} ${DEPS}; then \ - cat ${DEPS} >.deps; \ - rm -f ${DEPS}; \ + if ${MAKE} ${MFLAGS} $$deps; then \ + cat $$deps >.deps; \ + rm -f $$deps; \ ${DEPEND_OK}; \ else \ - rm -f .deps ${DEPS}; \ + rm -f .deps $$deps; \ ${DEPEND_FAILED}; \ fi; \ fi @@ -113,6 +121,7 @@ ${CPP} ${CPPFLAGS} -M $< >$@ .d.dep: +.xpm.dep: pre-depend: @@ -196,6 +205,14 @@ ${COMPILE_FAILED}; \ fi +.xpm.o: + ${COMPILE_STATUS} + if ${CC} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi + install: ${LIB} ${STATIC_LIB} ${PLUGIN} ${PROG} install-extra for i in ${SUBDIRS}; do \ ${DIR_ENTER}; \