automake-patches
[Top][All Lists]
Advanced

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

Re: [RFC + SIMPLE PATCHES] {maint} foreign mode and -Wportability


From: Stefano Lattarini
Subject: Re: [RFC + SIMPLE PATCHES] {maint} foreign mode and -Wportability
Date: Tue, 5 Oct 2010 13:24:46 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Tuesday 05 October 2010, Ralf Wildenhues wrote:
> Hello Stefano,
> 
> * Stefano Lattarini wrote on Mon, Oct 04, 2010 at 06:06:30PM CEST:
> > Currently, automake *force* the disabling of `-Wportability' when
> > in "foreign" mode.  What is the rationale for this?
> 
> Please search the archives.
> 
> The git log takes me to Release-1-9-236-g0ea21f8, which takes me to
> http://lists.gnu.org/archive/html/automake-patches/2006-03/msg00001
> .html
> 
> The point is that users complained a lot about seeing warnings to
> add AM_PROG_CC_C_O when they never cared about that odd 15-year
> old compiler, or about MSVC support.
I don't understand the problem.  Couldn't they just add
`-Wno-portability' to AM_AUTOMAKE_INIT?
> Let's not go back there.
I still think it would be better for the user to see *once* a warning
he doesn't want to see (he can enable `-Wno-portability' right away
to get rid of the warning if he wants to, and then forget about it),
rather than having a user *not* seeing a warning he might be 
interested into (and having no way to know he missed it).  At least,
this is what I'd want, were I the user in question.

Your call though.
 
> I agree that it is wrong to let '-Wportability foreign' not produce
> portability warnings (esp. since the option parsing order between
> command-line, options in configure.ac, and options in Makefile.am
> makes overriding hard), but I think the right fix for that would be
> to remember whether we defaulted the '-Wportability' setting or
> whether it came from an explicit setting.
What about this proposal (I still have no code):

  1. Add proper test(s) ensuring that AUTOMAKE_OPTIONS in Makefile.am
     win over AM_INIT_AUTOMAKE options in configure.in, which in turn
     win over cmdline options.
  2. Clearly document the above behaviour in the manual.
  3. Add (xfailing) tests ensuring that explicit `-W...' options
     always win over implicit warnings triggered by foreign, cygnus,
     gnu or gnits modes. (QUESTION: should this be true regardless
     of the place the `-W...' options are specified?  E.g., should
     a `-Wportability' specified on command line enable portability 
     warnings even if `foreign' is specified in AM_INIT_AUTOMAKE?
  4. Add some more micellanous tests on options setting/overriding.
  5. Implement the behaviour sketched in [3] above.  This might be
     tricky, possibly requiring some non-obvious refactoring (in
     which case more tests will be needed).

WDYT?

Regards,
  Stefano



reply via email to

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