Andrey Mazo
2014-Feb-21 12:58 UTC
[Bridge] [PATCH 0/4] bridge-utils: build system fixes and cleanups
This short patch series implements several enhancements to the bridge-utils build system. The first two patches had already been sent to the list [1,2] but unfortunately got no response. [1] http://lists.linuxfoundation.org/pipermail/bridge/2013-August/008535.html [2] http://lists.linuxfoundation.org/pipermail/bridge/2013-August/008536.html Andrey Mazo (4): bridge-utils: Abort compilation on error in any subdirectory bridge-utils: Removed unused variable in doc/Makefile.in bridge-utils: AC_OUTPUT should be used without arguments bridge-utils: Pretty print configure help Makefile.in | 4 ++-- configure.ac | 12 ++++++++---- doc/Makefile.in | 2 -- 3 files changed, 10 insertions(+), 8 deletions(-) -- 1.8.4.5
Andrey Mazo
2014-Feb-21 12:58 UTC
[Bridge] [PATCH 1/4] 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 at telum.ru> --- Makefile.in | 4 ++-- 1 file 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 -- 1.8.4.5
Andrey Mazo
2014-Feb-21 12:58 UTC
[Bridge] [PATCH 2/4] bridge-utils: Remove unused variable in doc/Makefile.in
Signed-off-by: Andrey Mazo <mazo at telum.ru> --- doc/Makefile.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/Makefile.in b/doc/Makefile.in index 23bfb06..df5a1a7 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -10,8 +10,6 @@ bindir=@bindir@ sbindir=@sbindir@ mandir=@mandir@ -SUBDIRS=libbridge brctl - all: clean: -- 1.8.4.5
Andrey Mazo
2014-Feb-21 12:58 UTC
[Bridge] [PATCH 3/4] bridge-utils: AC_OUTPUT should be used without arguments
This patch is a result of autoupdate-2.69 run and fixes the following warning: configure.ac:27: warning: AC_OUTPUT should be used without arguments. configure.ac:27: You should run autoupdate. Signed-off-by: Andrey Mazo <mazo at telum.ru> --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 5e3f89b..096f017 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(bridge-utils, 1.5) +AC_INIT([bridge-utils],[1.5]) AC_CONFIG_HEADERS(libbridge/config.h) AC_ARG_WITH( linux-headers, [ --with-linux-headers Location of the linux headers to use], @@ -24,4 +24,5 @@ AC_CHECK_FUNCS(if_nametoindex if_indextoname) AC_SUBST(KERNEL_HEADERS) -AC_OUTPUT(doc/Makefile libbridge/Makefile brctl/Makefile Makefile bridge-utils.spec) +AC_CONFIG_FILES([doc/Makefile libbridge/Makefile brctl/Makefile Makefile bridge-utils.spec]) +AC_OUTPUT -- 1.8.4.5
Andrey Mazo
2014-Feb-21 12:58 UTC
[Bridge] [PATCH 4/4] bridge-utils: Pretty print configure help
Use special AS_HELP_STRING() macro to correctly format configure --help output. Before the change: """ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-linux-headers Location of the linux headers to use """ After the change: """ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-linux-headers location of the linux headers to use """ Signed-off-by: Andrey Mazo <mazo at telum.ru> --- configure.ac | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 096f017..6b24e9e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,8 +2,11 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([bridge-utils],[1.5]) AC_CONFIG_HEADERS(libbridge/config.h) -AC_ARG_WITH( linux-headers, [ --with-linux-headers Location of the linux headers to use], - KERNEL_HEADERS=$withval, KERNEL_HEADERS="/usr/src/linux/include") +AC_ARG_WITH([linux-headers], + [AS_HELP_STRING([--with-linux-headers], [location of the linux headers to use])], + [KERNEL_HEADERS=$withval], + [KERNEL_HEADERS="/usr/src/linux/include"] +) dnl Checks for programs. AC_PROG_CC -- 1.8.4.5