On Saturday 30 June 2007, Philip Guenther wrote:
> On 6/29/07, Stephan Beal <[EMAIL PROTECTED]> wrote:
...
> > $(if abc,$(eval ...),$(error ...))
>
> Hmm, good point.  That's still doable in the "then and else stuff in
> variables" method, however:
...
> mythen = $(warning this should happen)
> myelse = blip $@
> foo = $(call if-eq-vars,abc,abc,mythen,myelse)
> bar = $(call if-eq-vars,abc,def,mythen,myelse)
> all:
>         @echo foo = ${foo}
>         @echo bar = ${bar}
>
> $ gmake
> Makefile:35: this should happen
> foo =
> bar = blip all

Weird. i'll have to meditate on that one a while before it sinks in.

> > Oh, well.
> >
> > Maybe we can get an $(if-eq LHS,RHS,THEN[,ELSE]) in 3.82? :) :) :)
>
> I thought portability to 3.80 was a concern.

For my current uses yes, but in 2-3 i will be able to justify using any 
features of 3.81/82 by saying, "you've had 3 years to upgrade, so if it 
doesn't work for you then too bad."

Historically speaking, it took a long time (2004+) before i could rely 
on having access to 3.80 on boxes i used. The main problem seems to be 
that very few people actually *actively* use Make, and therefore very 
few people really care what version it is as long as the source trees 
they download compile. Most(?) source trees use autotools, which is a 
least-common-denominator toolkit, meaning that they'll still be using 
the same feature set in 15 years because the weakest links in the 
portability chain will never upgrade their tools. So... most people get 
used to having weak Make implementations and don't think to upgrade 
(and don't need to ugprade if they're using Autotools because Autotools 
is, and always will be, a least-common-denominator tool).

My web hosters, for example:

[EMAIL PROTECTED]:~/cvs/toc2/toc2/make$ s11n 'make --version | head -1'
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
[EMAIL PROTECTED]:~/cvs/toc2/toc2/make$ wh 'make --version | head -1'
GNU Make 3.80

so i can't even use $(eval) on the first hoster.


-- 
----- stephan beal
http://www.wanderinghorse.net

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to