This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: options to make?


On Mon, 15 May 2000, Tom Tromey wrote:

> >> I'm wondering how to pass _additional_ compile time options to make
> >> without overriding existing ones.  Example:
> >> make all CFLAGS="-DSCM_DEBUG_XXX=1 ..."
> >> will override the settings for CFLAGS that are defined within the
> >> makefile:
> >> CFLAGS = -g -O2 -Wall -Wmissing-prototypes
> 
> Dirk> It seems that, currently, someone could use CPPFLAGS, since
> Dirk> CPPFLAGS is defined to be empty by default.  However, isn't
> Dirk> there some more general solution to this issue, like some
> Dirk> variable that is explicitly defined for the purpose to give the
> Dirk> user the possibility to add options at make time?
> 
> If you're using automake, then that variable is CFLAGS.  If you want
> your package to add flags to the command line which aren't overridden
> by CFLAGS, then you must use a different macro -- CFLAGS is a user
> macro, and setting it like that is an error.  (The other macro is
> "AM_CFLAGS")

After thinking a little about it, I realized that CFLAGS as defined by
guile does only contain non-essential options for debugging, optimization,
warnings.  Thus, from time to time it may make sense to override
these.  For example, it may very well make sense to say 
  make CFLAGS=-O9
in order to switch to a different level of optimization, switch warnings
off and avoid inclusion of debugging information.  So, I would not say the
way that guile does it is a misuse.

Probably I just have to live with the fact that when I give a new value
for CFLAGS to make that I also include everything else that is normally
given by guile but is non-essential.

Thanks for your answer.

Dirk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]