Currently bridge-utils makefile ignores compilation errors in
subdirectories, stepping into consecutive subdirs and finally
returning exit status of the last subdirectory's make.
The last subdirectory is now "doc", which has nothing to do for target "all",
so global `make all` always succeeds, effectively ignoring any build
errors in "libbridge" and "brctl" subdirectories.
This behaviour is odd as it breaks anyone relying on make's exit status.

Fix this by simply aborting make on the first error.
Don't inspect MAKEFLAGS for -k for simplicity.

Signed-off-by: Andrey Mazo <[email protected]>

diff --git a/Makefile.in b/Makefile.in
index 2f2fcba..5aed223 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -14,7 +14,7 @@ distdir = $(PACKAGE)-$(VERSION)
 SUBDIRS=libbridge brctl doc
 
 all:
-       for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x ; done
+       for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x || exit 1 ; done
 
 clean:
        for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x clean ; done
@@ -28,5 +28,5 @@ maintainer-clean: distclean
        rm -f brctl/Makefile libbridge/Makefile doc/Makefile
 
 install:
-       for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x install; done
+       for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x install || exit 1 ; 
done
 
-- 
1.8.1.5

Reply via email to