[Python-Dev] Any reason why CPPFLAGS not used in compiling?

Sjoerd Mullender sjoerd at acm.org
Mon Dec 6 21:47:37 CET 2004


Brett C. wrote:
> Martin v. Löwis wrote:
> 
>> Brett C. wrote:
>>
>>> I noticed that Makefile.pre.in uses the value from the environment 
>>> variable LDFLAGS but not CPPFLAGS.  Any reason for this? 
>>
>>
>>
>> How did you notice that? For LDFLAGS, Makefile.pre.in has
>>
>> LDFLAGS=        @LDFLAGS@
>>
>> This does *not* mean that the value from the environment is used.
>> Instead, it means that configure computes the value of LDFLAGS
>> when it generates Makefile.in. For CPPFLAGS, configure has nothing
>> to compute, so Makefile.pre.in just has the static value for
>> CPPFLAGS.
>>
> 
> I am not so sure that is true.  Checking configure.in, there is no 
> mention of CPPFLAGS anywhere.  And yet if I modify the definition of 
> CPPFLAGS in Makefile.pre.in to ``-I. -I./Include @CPPFLAGS@`` it ends up 
> containing the value I have for the environment variable at the end of 
> it.  I think the '@@' syntax uses a value from configure.in if it is 
> defined else it defaults to the value the shell has.

It's autoconf that deals with these flags.  See the output of "configure 
--help".


-- 
Sjoerd Mullender <sjoerd at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 374 bytes
Desc: OpenPGP digital signature
Url : http://mail.python.org/pipermail/python-dev/attachments/20041206/bfe3b473/signature.pgp


More information about the Python-Dev mailing list