SERVER_DEFINES in Makefiles -> substitute vs. variable reference

Ray Lehtiniemi rayl at mail.com
Fri May 26 07:50:12 PDT 2006


On Thursday 25 May 2006 17:07, Adam Jackson wrote:
> On Tuesday 23 May 2006 15:12, Enrico Weigelt wrote:
> > Hi folks,
> >
> > I've just seen, the config variable SERVER_DEFINES is used as
> > substitute ("@SERVER_DEFINES@") in several Makefile.am instead
> > of an variable reference ("$(SERVER_DEFINES)"). Using variable
> > references seems to be more clear to me.
> >
> > Is there any valid reason for not changing it to refernces ?
>
> They shouldn't ever produce different results.  Consistency would be a good
> thing, yeah.

as far as i could see, everything is already consistently using 
substitutions... i may have missed checking something out from cvs/git, but i 
don't see a single variable substitution for SERVER_DEFINES in the existing 
Makefile.am's....

isn't it more efficient at runtime to use substitutions anyway?  it seems like 
variable refs will need to be replaced on each and every make invocation, 
while substitutions produce hardcoded values in the generated makefiles.

i'm not the autoconf expert, but i thought variable refs were to be used for 
things the user might legitimately override while building/installing 
(prefix, libexecdir, and so forth), while substitutions were to be used for 
stuff that is decided at configuration time and not to be changed afterwards.  
SERVER_DEFINES sounds like it might be the latter....

ray



More information about the xorg mailing list