From: Martin von Gagern Date: Sun, 10 Aug 2014 02:44:45 +0000 (-0400) Subject: abort on errors in subdir builds X-Git-Tag: ppp-2.4.8~50^2 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=5e90783d11a59268e05f4cfb29ce2343b13e8ab2 abort on errors in subdir builds The current recursive loops do not check the exit status of make in subdirs which leads to `make` passing even when a subdir failed to compile or install. URL: https://bugs.gentoo.org/334727 Signed-off-by: Martin von Gagern Signed-off-by: Mike Frysinger --- diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux index ab8cf50..8a90e39 100644 --- a/pppd/plugins/Makefile.linux +++ b/pppd/plugins/Makefile.linux @@ -27,7 +27,7 @@ include .depend endif all: $(PLUGINS) - for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done + for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all || exit $$?; done %.so: %.c $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ @@ -37,12 +37,12 @@ VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h) install: $(PLUGINS) $(INSTALL) -d $(LIBDIR) $(INSTALL) $? $(LIBDIR) - for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d install; done + for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d install || exit $$?; done clean: rm -f *.o *.so *.a - for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done + for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean || exit $$?; done depend: $(CPP) -M $(CFLAGS) *.c >.depend - for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done + for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend || exit $$?; done