From 5e90783d11a59268e05f4cfb29ce2343b13e8ab2 Mon Sep 17 00:00:00 2001 From: Martin von Gagern Date: Sat, 9 Aug 2014 22:44:45 -0400 Subject: [PATCH] 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 --- pppd/plugins/Makefile.linux | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.2