bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9708: aclocal -W error does not treat warnings as errors


From: Stefano Lattarini
Subject: bug#9708: aclocal -W error does not treat warnings as errors
Date: Mon, 10 Oct 2011 12:44:43 +0200
User-agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; )

On Sunday 09 October 2011, Křištof Želechovski wrote:
> I would expect aclocal to fail and terminate the build script if warnings 
> appear
> [1]; however, it does not happen:
> 
> == Steps to reproduce ==
> { cat >configure.ac <<'#>configure.ac' && aclocal -W error && echo $?; }
> AC_INIT([name],[0.0.1])
> AC_CANONICAL_TARGET
> AM_INIT_AUTOMAKE
> AC_COMPILE_IFELSE()
> AC_USE_SYSTEM_EXTENSIONS
> #>configure.ac
> 
> == Actual results ==
> configure.ac:26: warning: AC_COMPILE_IFELSE was called before 
> AC_USE_SYSTEM_EXTENSIONS
> 0
> 
> == Expected results ==
> configure.ac:26: warning: AC_COMPILE_IFELSE was called before 
> AC_USE_SYSTEM_EXTENSIONS
> 
> == Workaround ==
> { WARNINGS=error aclocal; }
> aclocal: autom4te failed with exit status: 1
> 
> == Remarks ==
> It seems that aclocal fails to pass -Werror to autom4te.
>
Hi Křištof, thanks for the report and the diagnosis.

But honestly, I'm not sure it would be a good idea to "fix" the current
aclocal behaviour.  In fact, aclocal should IMHO be concerned only with
warnings coming from the distinctive functions it performs (e.g., when
it detects an underquoted macro in an .m4 files it has scanned, or when
it finds a macro defined in acinclude.m4 that is not really used in
configure.ac); but aclocal should not be too picky about warnings coming
from other tools (i.e., it's good to pass them along, but not to choke
on them, even when `-Werror' is in use).  So, if one wants the autoconf
warnings to be treated as errors, one should pass the `-Werror' flag to
the autoconf invocation.

That said, a documentation patch clarifying the current behaviour of
aclocal and the rationale behind it might be nice.  I might give it a
try, but it's quite low-priority.  Anyway, patches welcome.

Regards,
  Stefano





reply via email to

[Prev in Thread] Current Thread [Next in Thread]