axiom-developer
[Top][All Lists]
Advanced

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

Re: About shell commands in Makefile (was Re: [Axiom-developer] First (q


From: root
Subject: Re: About shell commands in Makefile (was Re: [Axiom-developer] First (quick & dirty) port of Axiom to gcl-2.5.2 and powerpc architecture)
Date: Sun, 4 May 2003 10:20:59 -0400

> You should use the "VAR := $(shell command)" syntax, like in the following
> example:
> 
> VAR := $(shell pwd)
> 
> default:
>       @echo $(VAR)
> 

I believe I tried this but perchance I muffed it up somehow.
I'll try it again. We really need to get it working so there
is no need to modify Makefile.pamphlet.

> 
> By the way, it is better to use the ":=" assignement in make rather than
> "=" assignement. ":=" is evaluated only one, while with the other
> assignement, "=", the variable is recursively expanded which can create
> slow makefile and unpredicatable results with shell expansion. Look at
> make documentation for more precise info (The Two Flavors of Variable
> chapter).

The variable in the Makefile are written in a certain way so they
can be overridden from the command line (e.g. make NOISE=). I'm 
not sure if the := form allows that. I'll reread the section you
mentioned and try some experiments. The time spent executing makefiles
clearly isn't the domination factor of the builds :-)

> 
> > Note that the AXIOM variable is used at runtime to find the libraries
> > so we can't just truncate it to "linux" or "power-pc". We could, of
> > course, define two variables rather than one.
> 
> Maybe we should stick to the GNU way of naming systems like
> 'powerpc-linux' or 'i386-bsd'?

Any name or convention can be used since, at the moment, the unparsed
"basename" is used as a switch to select the chunk used to expand into
the Makefile.(system). I'm happy to follow the GNU standard (or 
convention). Is there a note about this convention somewhere?

Tim
address@hidden
address@hidden





reply via email to

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