Undefined environment variable and operator ?=

2017-04-17 Thread zosrothko
Hello Here a simple makefile that sets the variable CXX if not defined to $(FOO)g++ CXX ?=$(FOO)g++ test: @echo $(CXX) and the some stories fandre@Ubuntu-x64:~/make$ unset CXX fandre@Ubuntu-x64:~/make$ make g++ fandre@Ubuntu-x64:~/make$ make FOO=bar g++ fandre@Ubuntu-x64:~/make$ FO

Re: Undefined environment variable and operator ?=

2017-04-17 Thread Paul Smith
On Mon, 2017-04-17 at 09:43 +0200, zosrothko wrote: > Here a simple makefile that sets the variable CXX if not defined to > $(FOO)g++ > CXX ?=$(FOO)g++ > > test: >     @echo $(CXX) > > and the some stories > > fandre@Ubuntu-x64:~/make$ unset CXX > fandre@Ubuntu-x64:~/make$ make > g++ > f

Re: Undefined environment variable and operator ?=

2017-04-17 Thread Paul Smith
On Mon, 2017-04-17 at 10:00 -0400, Toan Pham wrote: > What is the best way to override the default compiler?  is this good practice: > > CXX:=$(CROSS_COMPILE)$(CXX) That's the way I would do it, yes. ___ Help-make mailing list Help-make@gnu.org https:/

Re: Undefined environment variable and operator ?=

2017-04-17 Thread Toan Pham
Paul, What is the best way to override the default compiler? is this good practice: CXX:=$(CROSS_COMPILE)$(CXX) thanks, TP On Mon, Apr 17, 2017 at 9:37 AM, Paul Smith wrote: > On Mon, 2017-04-17 at 09:43 +0200, zosrothko wrote: > > Here a simple makefile that sets the variable CXX if not

Re: Undefined environment variable and operator ?=

2017-04-17 Thread Toan Pham
@Paul, thank you and have a good day. On Apr 17, 2017 10:04 AM, "Paul Smith" wrote: > On Mon, 2017-04-17 at 10:00 -0400, Toan Pham wrote: > > What is the best way to override the default compiler? is this good > practice: > > > > CXX:=$(CROSS_COMPILE)$(CXX) > > That's the way I would do it, ye

Re: Undefined environment variable and operator ?=

2017-04-17 Thread zosrothko
Le 17/04/2017 à 19:07, Toan Pham a écrit : > @Paul, thank you and have a good day. > > On Apr 17, 2017 10:04 AM, "Paul Smith" > wrote: > > On Mon, 2017-04-17 at 10:00 -0400, Toan Pham wrote: > > What is the best way to override the default compiler? is this >

Re: Undefined environment variable and operator ?=

2017-04-17 Thread Paul Smith
On Mon, 2017-04-17 at 20:24 +0200, zosrothko wrote: > Le 17/04/2017 à 19:07, Toan Pham a écrit : > > @Paul,  thank you and have a good day. > > > > On Apr 17, 2017 10:04 AM, "Paul Smith" wrote: > > > On Mon, 2017-04-17 at 10:00 -0400, Toan Pham wrote: > > > > What is the best way to override the