From 16c503f39a05726f3e994e42cb1c03e0a308b80d Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 9 May 2007 16:22:53 -0600 Subject: Tweak the shell scripting for descending into and building subdirs. In general, use this: @for dir in $(SUBDIRS) ; do \ if [ -d $$dir ] ; then \ (cd $$dir && $(MAKE)) || exit 1; \ fi \ done Basically, silently skip missing subdirs but generate an error and stop if there's a compilation or install problem. This was done inconsistantly before. In once case, a missing subdir was causing us to go into an infinte loop! --- src/mesa/drivers/dri/Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/mesa/drivers/dri/Makefile') diff --git a/src/mesa/drivers/dri/Makefile b/src/mesa/drivers/dri/Makefile index 1db878bab7..4abcc16c1b 100644 --- a/src/mesa/drivers/dri/Makefile +++ b/src/mesa/drivers/dri/Makefile @@ -14,21 +14,25 @@ $(TOP)/$(LIB_DIR): subdirs: - echo $(DRI_DIRS) @for dir in $(DRI_DIRS) ; do \ - echo $$dir ; \ - (cd $$dir && $(MAKE)) || exit 1; \ + if [ -d $$dir ] ; then \ + (cd $$dir && $(MAKE)) || exit 1 ; \ + fi \ done install: @for dir in $(DRI_DIRS) ; do \ - (cd $$dir && $(MAKE) install) || exit 1; \ + if [ -d $$dir ] ; then \ + (cd $$dir && $(MAKE) install) || exit 1 ; \ + fi \ done clean: @for dir in $(DRI_DIRS) ; do \ - (cd $$dir && $(MAKE) clean) ; \ + if [ -d $$dir ] ; then \ + (cd $$dir && $(MAKE) clean ; \ + fi \ done -rm -f common/*.o -- cgit v1.2.3