I read the BBv2 documentation and samples. I don't want to create my own generator, just to see "Hola" "Adios" as the output of this program:
rule myecho
{
_MSG on $(<) = $(MSG) ;
}
actions myecho bind _MSG
{
echo "MSG = $(_MSG)" ;
}
constant MSG : "hola" ;
make Hola : : @myecho ;
constant MSG : "adios" ;
make Adios : : @myecho ;
Why I only see "adios" "adios" ? I guess it's because the variable inside the action is not evaluated until the action executes. But the rule myecho should be executed in the first pass, hence _MSG should contain "Hola" for target Hola, and "Adios" for target Adios.
Am I missing anything? How can I pass a different message to a Make rule depending on the target? Can I avoid creating a generator?
Regards.