[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Breaking from a for loop?
From: |
David Aldrich |
Subject: |
Breaking from a for loop? |
Date: |
Mon, 23 Nov 2009 16:43:30 +0000 |
Hi
Our top level makefile builds a number of dynamic libraries, each of which has
its own makefile. Here are parts of the makefile (simplified):
DYNAMIC_LIBS = $(TRUNKDIR)/MyLibs/Lib1/lib1
DYNAMIC_LIBS += $(TRUNKDIR)/MyLibs/Lib2/lib2
DYNAMIC_LIBS += $(TRUNKDIR)/MyLibs/Lib3/lib3
DYNAMIC_LIBS += $(TRUNKDIR)/MyLibs/Lib4/lib4
$(ARCHIVES_R) $(ARCHIVES_D) : makedynamiclibs
.PHONY : makedynamiclibs
makedynamiclibs :
@for d in $(DYNAMIC_LIBS); do $(MAKE) --quiet --directory=$$d
$(MAKECMDGOALS); done
This works fine but, when a library makefile exits with a failure code, the for
loop continues with the next makefile. This means that this top level makefile
can exit with status 0 even if a lower level makefile exits with status 1 or 2.
How can I cause the for loop to break, and this makefile to exit with a failure
status, if a lower level makefile fails, please?
Best regards
David
- make gives exit status of 0 even when compile fails, David Aldrich, 2009/11/23
- Re: make gives exit status of 0 even when compile fails, Paul Smith, 2009/11/23
- RE: make gives exit status of 0 even when compile fails, David Aldrich, 2009/11/23
- Breaking from a for loop?,
David Aldrich <=
- Re: Breaking from a for loop?, Philip Guenther, 2009/11/23
- RE: Breaking from a for loop?, David Aldrich, 2009/11/24
- RE: Breaking from a for loop?, Paul Smith, 2009/11/24
- RE: Breaking from a for loop?, David Aldrich, 2009/11/24
- RE: Breaking from a for loop?, Paul Smith, 2009/11/24
- RE: Breaking from a for loop?, David Aldrich, 2009/11/24
- RE: Breaking from a for loop?, Paul Smith, 2009/11/24
- RE: Breaking from a for loop?, David Aldrich, 2009/11/24