From cba14d85a854df8b5f24342c072acf21813761b6 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Tue, 6 May 2008 12:29:53 -0700 Subject: Error consistently when running recursive make When changing directories and running a sub-make, ensure that both the cd and make commands propagate errors to the parent make. --- Makefile | 6 +++--- src/egl/Makefile | 4 ++-- src/glu/Makefile | 4 ++-- src/glx/Makefile | 4 ++-- src/mesa/Makefile | 14 +++++++------- src/mesa/drivers/beos/Makefile | 6 +++--- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 1a0c6093b13..62ec0709796 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ default: $(TOP)/configs/current doxygen: - (cd doxygen ; make) ; \ + cd doxygen && $(MAKE) clean: @for dir in $(SUBDIRS) ; do \ @@ -52,10 +52,10 @@ linux-directfb-install: # Xserver GLcore module glcore: - cd src/mesa/drivers/xorg ; $(MAKE) + cd src/mesa/drivers/xorg && $(MAKE) glcore-install: - cd src/mesa/drivers/xorg ; $(MAKE) install + cd src/mesa/drivers/xorg && $(MAKE) install .PHONY: default doxygen clean realclean install linux-directfb-install \ glcore glcore-install diff --git a/src/egl/Makefile b/src/egl/Makefile index 931e9d0cb86..036bf1f01a1 100644 --- a/src/egl/Makefile +++ b/src/egl/Makefile @@ -11,7 +11,7 @@ default: subdirs subdirs: @for dir in $(SUBDIRS) ; do \ if [ -d $$dir ] ; then \ - (cd $$dir ; $(MAKE)) || exit 1 ; \ + (cd $$dir && $(MAKE)) || exit 1 ; \ fi \ done @@ -19,6 +19,6 @@ subdirs: clean: @for dir in $(SUBDIRS) ; do \ if [ -d $$dir ] ; then \ - (cd $$dir ; $(MAKE) clean) ; \ + (cd $$dir && $(MAKE) clean) ; \ fi \ done diff --git a/src/glu/Makefile b/src/glu/Makefile index 836baa684cb..3ee5cfddd7a 100644 --- a/src/glu/Makefile +++ b/src/glu/Makefile @@ -10,7 +10,7 @@ SUBDIRS = $(GLU_DIRS) default: $(TOP)/configs/current @for dir in $(SUBDIRS) ; do \ - (cd $$dir ; $(MAKE)) ; \ + (cd $$dir && $(MAKE)) || exit 1 ; \ done # GLU pkg-config file @@ -29,5 +29,5 @@ install: glu.pc clean: @for dir in $(SUBDIRS) ; do \ - (cd $$dir ; $(MAKE) clean) ; \ + (cd $$dir && $(MAKE) clean) ; \ done diff --git a/src/glx/Makefile b/src/glx/Makefile index bd486cf81b3..a96e0dadaa7 100644 --- a/src/glx/Makefile +++ b/src/glx/Makefile @@ -4,9 +4,9 @@ include $(TOP)/configs/current default: - cd mini ; $(MAKE) + cd mini && $(MAKE) clean: - cd mini ; $(MAKE) clean + cd mini && $(MAKE) clean diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 633bfb19a3b..5f45db1d24d 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -42,7 +42,7 @@ default: # BeOS driver target beos: depend subdirs libmesa.a - cd drivers/beos; $(MAKE) + cd drivers/beos && $(MAKE) ###################################################################### @@ -56,7 +56,7 @@ libmesa.a: $(SOLO_OBJECTS) fi linux-solo: depend subdirs libmesa.a - cd drivers/dri ; $(MAKE) + cd drivers/dri && $(MAKE) ##################################################################### @@ -69,7 +69,7 @@ libgl-core: $(CORE_OBJECTS) $(GL_LIB_DEPS) directfb: depend subdirs libgl-core - cd drivers/directfb ; $(MAKE) + cd drivers/directfb && $(MAKE) ##################################################################### @@ -145,11 +145,11 @@ depend: $(ALL_SOURCES) subdirs: @ if echo "$(ASM_FLAGS)" | grep -q USE_X86_ASM ; then \ - (cd x86 ; $(MAKE)) ; \ + (cd x86 && $(MAKE)) || exit 1 ; \ fi @ if echo "$(ASM_FLAGS)" | grep -q USE_X86_64_ASM ; then \ - (cd x86 ; $(MAKE)) ; \ - (cd x86-64 ; $(MAKE)) ; \ + (cd x86 && $(MAKE)) || exit 1 ; \ + (cd x86-64 && $(MAKE)) || exit 1 ; \ fi pcedit = sed \ @@ -180,7 +180,7 @@ install-osmesa: install-drivers: @for target in $(DRIVER_DIRS); do \ case "$$target" in \ - dri) cd drivers/dri ; $(MAKE) install ;; \ + dri) (cd drivers/dri && $(MAKE) install) || exit 1 ;; \ esac; \ done diff --git a/src/mesa/drivers/beos/Makefile b/src/mesa/drivers/beos/Makefile index 9c7d6affc3b..07d3d344f17 100644 --- a/src/mesa/drivers/beos/Makefile +++ b/src/mesa/drivers/beos/Makefile @@ -170,10 +170,10 @@ OBJECTS := $(DRIVER_OBJECTS:.cpp=.o) default: depend $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(MESA_MODULES): - cd $(TOP)/src/mesa; $(MAKE) mesa.a ; + cd $(TOP)/src/mesa && $(MAKE) mesa.a ; $(GLU_MODULES): - cd $(GLU_DIR); $(MAKE) $(subst $(GLU_DIR)/,,$(GLU_MODULES)) ; + cd $(GLU_DIR) && $(MAKE) $(subst $(GLU_DIR)/,,$(GLU_MODULES)) ; $(TOP)/$(LIB_DIR): mkdir $(TOP)/$(LIB_DIR) @@ -184,7 +184,7 @@ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES) $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES) # $(GLU_OBJECTS): -# cd $(GLU_DIR); $(MAKE) $< ; +# cd $(GLU_DIR) && $(MAKE) $< ; depend: $(DRIVER_SOURCES) $(GLU_SOURCES) touch depend -- cgit v1.2.3