Hi Jan, sorry for the long delay.
* Jan Engelhardt wrote on Fri, Jan 02, 2009 at 08:00:21PM CET: > > given a configure.ac 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: AM_INIT_AUTOMAKE([OPTIONS]...) should apply to all Makefile.in files, and should be overridden by per-Makefile.am AUTOMAKE_OPTIONS = [OPTIONS]... 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 parse_WARNINGS). 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 Makefile.in files (the "strictness", and --ignore-deps if applicable). Now, when the user changes these options, say, in configure.ac, 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. Cheers, Ralf
