[Omake] Re: "filter" broken in new omake?

David Kågedal davidk at lysator.liu.se
Fri Dec 15 02:11:01 PST 2006


Aleksey Nogin <nogin at metaprl.org> writes:

> On 14.12.2006 01:23, David Kågedal wrote:
>
>>> E.g.:
>>>
>>> %.o: %.c
>>>  res = $(filter %.bla, ...)
>>>  ...
>>>
>>> This will filter foo.bla rather than anything ending in ".bla" if "foo.o" is
>>> the current target.
>> You can probably use $* instead.
>
> David, I think you misunderstood - he was trying to do the opposite -

Ah, I see.

>> Consider the following Makefile:
>> foo-%-bar:
>>         echo $* > $@
>> Running "make foo-xxx-bar" will run the command
>> 	echo xxx > foo-xxx-bar
>> In omake, the $* variable expands to $@ with the suffix stripped, if
>> I
>> understood correctly. This is much less useful.
>>
> Well, why is it less useful? Note that OMake provides you a way to get
> _both_. If you want what make gives you, just use %. If you want
> OMake's $*, you can get that too.

Maybe it was because I didn't realize I could use % in the build rules
too.  Just like the original poster in this thread, I thought that %
had no special meaning outside the target line.


-- 
David Kågedal



More information about the Omake mailing list