CFLAGS = "-g $CFLAGS", AM_CFLAGS

Ethan Blanton elb at pidgin.im
Wed Jul 14 13:37:04 EDT 2010


Дилян Палаузов spake unto us the following wisdom:
> As of pidgin-2.7.1 configure.ac contains the lines
> 
> 1267: if test "x$GCC" = "xyes"; then
> ...
> 1343:     CFLAGS = "-g $CFLAGS"
> 1344: fi
> 
> This means, that the one who compiles the software effectively
> cannot turn off "-g" (debug information) by using standard tweaks
> (command line options, CFLAGS as environment variable) as it is hard
> coded in the Makefile.   *Is this intended so?*

Sure you can.  You should be able to run 'make CFLAGS=-Whatever', and
it should replace the -g.

> Apart from this, the automake manual says (http://www.gnu.org/software/hello/manual/automake/Flag-Variables-Ordering.html),
> that user variables like CFLAGS shall never be defined in the
> Makefile.am file, but AM_CFLAGs shall be used instead.  *Shall I
> write a bug report for CFLAGS -> AM_CFLAGS or is this email
> sufficient?*

I'm not super concerned about this, myself.  I was concerned when I
thought there was a new override problem, but I can't reproduce this
here.  It seems to me like things are working exactly as I would
expect.  I read that as saying that AM_CFLAGS would be for CFLAGS
which are necessary for compilation which the user shouldn't change;
CFLAGS is optional stuff that, if the user wishes, may be changed
without affecting compilation adversely.  For examlpe, removing -g.

Ethan

-- 
The laws that forbid the carrying of arms are laws [that have no remedy
for evils].  They disarm only those who are neither inclined nor
determined to commit crimes.
		-- Cesare Beccaria, "On Crimes and Punishments", 1764
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: Digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20100714/383c66b0/attachment.sig>


More information about the Devel mailing list