diff options
author | Andrey Mazo <mazo@telum.ru> | 2014-02-24 14:56:43 +0400 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2014-02-28 10:15:53 -0800 |
commit | 6d9236a48350341469c663b492386ffdaafa8042 (patch) | |
tree | fb7a75c8df4e06049d2466d6358ee45bfc07dedd | |
parent | 97d6888721f7b19a7e3e3a22ee4542fc0ac75c27 (diff) | |
download | bridge-utils-6d9236a48350341469c663b492386ffdaafa8042.tar.gz |
bridge-utils: Abort compilation on error in any subdirectory
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.
For example, see Gentoo bug #483692 [1].
Fix this by simply aborting make on the first error.
Don't inspect MAKEFLAGS for -k for simplicity.
[1] https://bugs.gentoo.org/show_bug.cgi?id=483692
Signed-off-by: Andrey Mazo <mazo@telum.ru>
-rw-r--r-- | Makefile.in | 4 |
1 files changed, 2 insertions, 2 deletions
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 |