[PATCH app, driver, libs 0/43] Replace deprecated Automake INCLUDES variable

Dan Nicholson dbn.lists at gmail.com
Fri Mar 19 12:06:16 PDT 2010


On Fri, Mar 19, 2010 at 11:42 AM, Gaetan Nadon
<gaetan.nadon at videotron.ca> wrote:
>
> Rather than posting 43 patches, I'll summarize the changes and include the
> diffs here.
>
> Automake produces a warning about the INCLUDES variable being deprecated.
> There were only 43 out of 240 modules still using it. It has been replaced
> with AM_CPPFLAGS. In some modules, both INCLUDES and AM_CPPFLAGS were used.
>
> Further more, there isn't a good separation between pre-processor and
> compiler flags. The lint tool only accepts pre-processor flags, so the lint
> target had to be reworked. Separation is also required to allow user to
> override with CFLAGS and CPPFLAGS on the configure invocation.
>
> In addition of replacing/merging INCLUDES and AM_CPPFLAGS, compiler and
> pre-processor flags have been regrouped in AM_CFLAGS and AM_CPPFLAGS
> respectively. The order of -I has been preserved the INCLUDES variable
> taking precedence over AM_CPPFLAGS. Attention has been given so as not alter
> the final gcc command emitted. One exception is that Automake does not pass
> pre-processor flags when linking a library which were previously lumped
> together with C flags.

I'm not sure that putting the package CFLAGS into AM_CPPFLAGS won't
cause problems. While it's very likely that $(PKG_CFLAGS) only
contains preprocessor directives, we don't know that and have no way
of enforcing it. I think it would be better to take the safe route and
put them in AM_CFLAGS even if it means -I include paths will be passed
when linking.

--
Dan


More information about the xorg-devel mailing list