Ralf Wildenhues | 10 Jun 2007 09:13
Picon
Picon

Re: Prefer AM_CPPFLAGS to <at> CPPFLAGS <at>

Hi Stepan,

* Stepan Kasal wrote on Wed, Jun 06, 2007 at 11:04:27AM CEST:
> 
> --- doc/autoconf.texi	4 Jun 2007 22:49:42 -0000	1.1160
> +++ doc/autoconf.texi	6 Jun 2007 08:40:55 -0000
>  <at>  <at>  -19152,10 +19152,10  <at>  <at> 
>  
>   <at> item
>  This solution can be simplified when compiling a program: you may either
> -extend the  <at> code{CPPFLAGS}:
> +extend the  <at> code{CPPFLAGS}, e.g., when using Automake:
>  
>   <at> example
> -CPPFLAGS = -DDATADIR='"$(datadir)"'  <at>  <at> CPPFLAGS <at>  <at> 
> +AM_CPPFLAGS = -DDATADIR='"$(datadir)"'
>   <at> end example

Why not show both (the non-Automake case is useful and conveys
additional information)?

Cheers,
Ralf

Stepan Kasal | 11 Jun 2007 12:47
Picon

Re: Prefer AM_CPPFLAGS to <at> CPPFLAGS <at>

Hello Ralf,

On Sun, Jun 10, 2007 at 09:13:14AM +0200, Ralf Wildenhues wrote:
> > -CPPFLAGS = -DDATADIR='"$(datadir)"'  <at>  <at> CPPFLAGS <at>  <at> 
> > +AM_CPPFLAGS = -DDATADIR='"$(datadir)"'
> 
> Why not show both (the non-Automake case is useful and conveys
> additional information)?

A nice idea, but:

It would make the node too complex.
The node "19.5 How Do I `#define' Installation Directories?" is in
the FAQ section, so people might expect it is short.

More importantly: The node explains that a naive AC_DEFINE hardwires
an incorrect path and (though there are ways to hardwire the correct
one (one of them is to let `make' compute the actual path (which can
be done either by extending CPPFLAGS (example 1) or by a make-created
header file (example 2)))) you rather should not hardwire paths at all.

And you are effectively suggesting to replace "example 1" by a pair
of examples.  I do not think this is a place where the information
should be added, at least as it stands now.

Have a nice day,
	Stepan


Gmane