build: exit the SUBDIR build loop if an error is detected

This commit is contained in:
Kenny Napier 2019-02-14 21:23:16 +00:00 committed by Roy Marples
parent d8fab20459
commit 69e88d53ad
4 changed files with 12 additions and 13 deletions

View File

@ -22,10 +22,10 @@ CLEANFILES+= *.tar.xz
.SUFFIXES: .in .SUFFIXES: .in
all: config.h all: config.h
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
depend: config.h depend: config.h
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
tests: tests:
cd $@; ${MAKE} $@ cd $@; ${MAKE} $@
@ -36,17 +36,17 @@ hooks:
cd $@; ${MAKE} cd $@; ${MAKE}
eginstall: eginstall:
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
install: install:
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
proginstall: proginstall:
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
clean: clean:
rm -rf cov-int dhcpcd.xz rm -rf cov-int dhcpcd.xz
for x in ${SUBDIRS} tests; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS} tests; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
distclean: clean distclean: clean
rm -f config.h config.mk config.log \ rm -f config.h config.mk config.log \

View File

@ -45,7 +45,7 @@ CLEANFILES+= *.tar.xz
$< > $@ $< > $@
all: ${TOP}/config.h ${PROG} ${SCRIPTS} ${MAN5} ${MAN8} all: ${TOP}/config.h ${PROG} ${SCRIPTS} ${MAN5} ${MAN8}
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
dev: dev:
cd dev && ${MAKE} cd dev && ${MAKE}
@ -84,7 +84,7 @@ _proginstall: ${PROG}
${INSTALL} -d ${DESTDIR}${DBDIR} ${INSTALL} -d ${DESTDIR}${DBDIR}
proginstall: _proginstall ${EMBEDDEDINSTALL} proginstall: _proginstall ${EMBEDDEDINSTALL}
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
_maninstall: ${MAN5} ${MAN8} _maninstall: ${MAN5} ${MAN8}
${INSTALL} -d ${DESTDIR}${MANDIR}/man5 ${INSTALL} -d ${DESTDIR}${MANDIR}/man5
@ -130,7 +130,7 @@ install: proginstall _maninstall _confinstall eginstall
clean: clean:
rm -f ${OBJS} ${PROG} ${PROG}.core ${CLEANFILES} rm -f ${OBJS} ${PROG} ${PROG}.core ${CLEANFILES}
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
distclean: clean distclean: clean
rm -f .depend rm -f .depend

View File

@ -24,7 +24,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h> #include <sys/socket.h>

View File

@ -1,16 +1,16 @@
SUBDIRS= crypt eloop-bench SUBDIRS= crypt eloop-bench
all: all:
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
install: install:
proginstall: proginstall:
clean: clean:
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
test: test:
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
tests: test tests: test