help-gnu-utils
[Top][All Lists]
Advanced

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

Re: GNU Make: Add something to CXXFLAGS when invoking make


From: Henrik Carlqvist
Subject: Re: GNU Make: Add something to CXXFLAGS when invoking make
Date: Wed, 08 Nov 2006 21:35:57 +0100
User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)

"Eric Lilja" <mindcooler@gmail.com> wrote:
> $ make CXXFLAGS+='-DFRIEND
> but instead of adding -DFRIEND to CXXFLAGS, it replaced it...

When I did some experiments with this I found the same:

-8<---------------------------
TEST += world
 
all:
        echo $(TEST)
-8<---------------------------

$ make
echo world
world
$ make TEST=hello
echo hello
hello
$ make TEST+=hello
echo hello
hello

So I had to use an extra variable:

-8<---------------------------
TEST2 += $(TEST) world

all:
        echo $(TEST2)
-8<---------------------------

$ make
echo  world
world
$ make TEST=hello
echo hello world
hello world

regards Henrik
-- 
The address in the header is only to prevent spam. My real address is:
hc8(at)uthyres.com Examples of addresses which go to spammers:
root@variousus.net root@localhost



reply via email to

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