-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stephan Beal wrote:
> i'm trying to implement an $(if-eq ...) function which goes a little 
> something like this:
> 
> $(call if-eq,LHS,RHS,THEN[,ELSE])

A simple way to do this is to use the GMSL seq (string equal function)
and then do

$(if $(call seq,LHS,RHS),THEN,ELSE)

Of course you cannot wrap this in a $(call) because THEN and ELSE will
be expanded and if you have any side effects ($(warning), $(error),
$(info), $(shell), $(eval)) in them then that would be undesirable.  If
not then

    if-eq = $(if $(call seq,$1,$2),$3,$4)

should work fine.

John.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGhlazLphrp73n/hARAibdAJ0Y+wC9Jn9ma+eDAChZpoF3CqxTUwCfcXQW
qQFgD57cXh3wO9G5BAn5G5U=
=KuDx
-----END PGP SIGNATURE-----


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

Reply via email to