[Top][All Lists]

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

Re: Automake_flags not override

From: Ralf Wildenhues
Subject: Re: Automake_flags not override
Date: Mon, 16 Feb 2009 22:58:02 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Jan,

sorry for the long delay.

* Jan Engelhardt wrote on Fri, Jan 02, 2009 at 08:00:21PM CET:
> given a which defines AM_INIT_AUTOMAKE([-Wall]), 
> running `automake -Wnone` still produces the warnings I had with -Wall. 
> I think command line should override any earlier flags.

For what it's worth, that would have been my expectation as well:

should apply to all files, and should be overridden by

which in turn should be overridden by
  automake [OPTIONS]...

However, the latter semantics is not documented anywhere in the manual,
and is not the case either.

What really happens is that the command-line options are interpreted
first (way earlier than the others, in parse_arguments, after

As to why it works this way: I'm pretty sure there was a good reason to
go this way.  I haven't found a definite answer in the history or mail
archives yet, but I think it might be this:

automake stores some arguments in the rebuild rule for the
files (the "strictness", and --ignore-deps if applicable).  Now, when
the user changes these options, say, in, then types 'make',
a rebuild will invoke automake with those old options that are still in
the Makefile.  In that case it would be better if the command line
options are overridden by those from the newer file; otherwise you could
never change them without also manually invoking the autotools yourself.

I suppose the priority ordering for warnings was intended to not differ
from that of these flags.  Not sure though, and I currently don't yet
see which kind of change would be an obvious improvement.


reply via email to

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