build: enable all warnings as fatal in our own build system
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 3 Jan 2013 13:32:54 +0000 (14:32 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 3 Jan 2013 13:36:42 +0000 (14:36 +0100)
Automake should of course be able to bootstrap itself in a
warning-free manner w.r.t. the Autotools.  So make any failure
to do so fatal.  Not doing so caused the regression fixed by
previous commit 'v1.13.1-22-ga790fae' to go unnoticed.

* configure.ac (AM_INIT_AUTOMAKE): Add '-Werror' and '-Wall'.
* bootstrap.sh: Pass the '-Wall -Werror' options to aclocal,
automake and autoconf invocations.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
bootstrap.sh
configure.ac

index 07bcddd..0ea691d 100755 (executable)
@@ -111,12 +111,13 @@ $PERL ./gen-testsuite-part > t/testsuite-part.tmp
 chmod a-w t/testsuite-part.tmp
 mv -f t/testsuite-part.tmp t/testsuite-part.am
 
-# Run the autotools.
+# Run the autotools.  Bail out if any warning is triggered.
 # Use '-I' here so that our own *.m4 files in m4/ gets included,
 # not copied, in aclocal.m4.
-$PERL ./aclocal.tmp -I m4 --automake-acdir m4 --system-acdir m4/acdir
-$AUTOCONF
-$PERL ./automake.tmp
+$PERL ./aclocal.tmp -Wall -Werror -I m4 \
+                    --automake-acdir=m4 --system-acdir=m4/acdir
+$AUTOCONF -Wall -Werror
+$PERL ./automake.tmp -Wall -Werror
 
 # Remove temporary files and directories.
 rm -rf aclocal-$APIVERSION automake-$APIVERSION
index cea7aaa..f86af18 100644 (file)
@@ -39,7 +39,7 @@ AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"])
 dnl We call AC_PROG_CC in an unusual way, and only for use in our
 dnl testsuite, so also use 'no-dependencies' and 'no-define' among
 dnl the automake options to avoid bloating and potential problems.
-AM_INIT_AUTOMAKE([dist-xz filename-length-max=99 color-tests
+AM_INIT_AUTOMAKE([-Wall -Werror dist-xz filename-length-max=99 color-tests
                   no-define no-dependencies])
 
 ## Keep this on a line of its own, since it must be found and processed