[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $(if-eq ...)
From: |
Stephan Beal |
Subject: |
Re: $(if-eq ...) |
Date: |
Sat, 30 Jun 2007 00:10:05 +0200 |
User-agent: |
KMail/1.9.7 |
On Saturday 30 June 2007, Philip Guenther wrote:
> The closest alternative I can think of is to instead pass the names
> of variables to be evaluated for the 'then' and 'else' clauses:
>
> mythen = $(warning this should happen)
> myelse = $(warning this should not happen)
> $(call if-eq-vars,abc,abc,mythen,myelse)
i thought about that, but the general problem is that i don't ALWAYS
want to $(eval) the result. Sometimes i want to use it as-is. e.g., a
rather contrived example would be the equivalent of:
$(if abc,$(eval ...),$(error ...))
But that requires/relies on short-circuit expansion, which of course is
only available to builtins. Fair enough.
> That's not hard to implement:
...
> ...but it's clunky to use, eliminating most the point of the
> function.
i agree.
Oh, well.
Maybe we can get an $(if-eq LHS,RHS,THEN[,ELSE]) in 3.82? :) :) :)
(hint, hint, wink, wink)
--
----- stephan beal
http://www.wanderinghorse.net
signature.asc
Description: This is a digitally signed message part.