Back on this bug from May 2019 (https://bugs.gnu.org/35526). Sorry for the delay.
The implication here is that for any of the *FLAGS variables, later options are inherently more effective than earlier options. This is not the case universally. Granted. After reading the messages here, here's the change to the manual I came up with. If any comments before I commit it, let me know. Thanks. --karl --- a/doc/automake.texi +++ b/doc/automake.texi @@ -12491,16 +12491,21 @@ make @end example The reason @samp{$(CPPFLAGS)} appears after @samp{$(AM_CPPFLAGS)} or -@samp{$(mumble_CPPFLAGS)} in the compile command is that users -should always have the last say. It probably makes more sense if you -think about it while looking at the @samp{CXXFLAGS=-O0} above, which -should supersede any other switch from @code{AM_CXXFLAGS} or -@code{mumble_CXXFLAGS} (and this of course replaces the previous value -of @code{CXXFLAGS}). - -You should never redefine a user variable such as @code{CPPFLAGS} in -@file{Makefile.am}. Use @samp{automake -Woverride} to diagnose such -mistakes. Even something like +@samp{$(mumble_CPPFLAGS)} in the compile command is that users should +have the last say. In the example above, the desire is for the +@samp{CXXFLAGS=-O0} to supersede any other switch from +@code{AM_CXXFLAGS} or @code{mumble_CXXFLAGS}. + +@c https://bugs.gnu.org/35526 +It's true that not all options to all programs can be overridden. So +in general, users could conceivably want to place options at arbitrary +places in the command line, but Automake does not support this. It +would be difficult to make such generality comprehensible. Being able +to specify the final options commonly suffices. + +Thus, you should never redefine a user variable such as +@code{CPPFLAGS} in @file{Makefile.am}. Use @samp{automake -Woverride} +to diagnose such mistakes. Even something like @example CPPFLAGS = -DDATADIR=\"$(datadir)\" @@CPPFLAGS@@ compile finished at Tue Feb 9 18:20:52 2021