|
Boost : |
From: David Turner (david.turner_at_[hidden])
Date: 2001-06-26 16:44:46
hi again,
> For now, you'll need to assign a dummy variable with the
> call as in:
>
> _ignore = [ $(RULE) params ] ;
>
> hideous, but it works..
>
Actually, a better solution would probably to define
a new rule like the following:
##########################################################
#
# invoke VARIABLE : params1 : params2 : params3 : ....
#
# a special rule used to invoke rules indirectly.
# $(<) must be a variable name and will be expanded
# to determine which rule to call
#
#
rule invoke # VARIABLE : params1 : params2 : ....
{
local _ignore ;
_ignore = [ $($(1)) $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] ;
}
and a simple example would be:
RULE = "ECHO" ;
invoke RULE : "hello world" ;
seems a lot cleaner :-)
- David Turner
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk