Re: AM_MAINTAINER_MODE_DEFINES



Hey Chris,

On Sat, 2003-11-01 at 08:07, Christopher James Lahey wrote:
> I added AM_MAINTAINER_MODE_DEFINES to gnome-common.m4.
> 
> This macro checks maintainer mode, and if it's on defines two make
> variables:
> 
> DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED ..."
> ENABLE_WERROR="-Werror"
> 
> If maintainer mode is off, it sets both variables to ""
> 
> The idea is that we shouldn't ship packages with DISABLE_DEPRECATED in
> them.  If we do, then our packages may break when new versions of things
> come out.  However, DISABLE_DEPRECATED should be on for developers when
> working from cvs.  This is also true in many cases for -Werror
> (depending on the project.)

I'm not sure the ENABLE_WERROR is the right way to do things. We already
have the GNOME_COMPILE_WARNINGS macro to enable people to set this kind
of stuff -- although if you only want it in maintainer mode you have to
do your own testing. Some modules do this by testing if they are
building from CVS or the macro version number if odd or whatever; it's
not clear that this is something best triggered by maintainer mode.
Adding another way to do the same thing (I assume people are meant to
include @ENABLE_WERROR@ in Makefile.am where appropriate, right?) just
provides a loaded gun with foot-autoseek enabled. Now you have to
remember not to use GNOME_COMPILE_WARNINGS if you use
AM_MAINTAINER_MODE_DEFINES otherwise all sorts of interesting confusion
will result.

We cannot really enforce -Werror in general, since it is so compiler
specific; even gcc has, on occasion, shipped with some dumb warnings and
we don't want to restrict people to just building with gcc. So it is
either a very insensitive maintainer or extremely simple code that will
benefit from having the macro as written in their build system. I just
know that if this goes in unmolested, the first package to use it is
going to end up causing Morten "I have the least forgiving build system
in the world" Welinder to send in a bug report. :-)

So my preference would be to see ENABLE_WERROR backed out. And could you
namespace the macro a bit better? Maybe GNOME_MAINTAINER_MODE_DEFINES or
something so that looking at it it is clear it has nothing to do with
the Automake maintainers' default action for maintainer mode.

Cheers,
Malcolm




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