automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: preprocessor output target


From: John Calcote
Subject: Re: preprocessor output target
Date: Thu, 05 Jun 2008 10:35:04 -0600
User-agent: Thunderbird 2.0.0.12 (X11/20080226)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian Dessent wrote:
> Note however that if you wish to override a variable on the make command
> in order to add an option, you have to specify the full contents of the
> current value (which for CFLAGS is typically -g -O2 if using gcc and you
> didn't explicitly specify a CFLAGS when configuring.)  If you just do
> "make CFLAGS=-save-temps" then you lose all the settings that the build
> system might have added, which could be significant.  In those cases
> where CFLAGS is nontrivial I first look at the generated Makefile to see
> what the substituted value is, and then to that I add or remove whatever
> flags I'm interested in.  I wish there was a way to invoke make with a
> += override instead of a = override but this does not exist AFAIK.

This is the primary reason, as I understand it, for the statement made
in the Autoconf manual that these variables (CFLAGS, LDFLAGS, CC, etc),
are User variables, and shouldn't be set to anything by the Autotools.
The default for normal builds is usually something simple like "-g -O2".
Autotools scripts should use tool-specific variables, such as AM_CFLAGS,
etc.

Regards,
John
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFISBW4dcgqmRY/OH8RAgEfAKCMYkU5rbvlEh2pZcZoMEquxxqBswCfQd96
PVRnKYjMvd/Ug8fI2+Eo23A=
=CaLJ
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]