[Omake] Re: "filter" broken in new omake?
David Kågedal
davidk at lysator.liu.se
Thu Dec 14 01:23:56 PST 2006
"Markus Mottl" <markus.mottl at gmail.com> writes:
> Hi,
>
> the new release has broken our code, and I unfortunately don't know how to
> fix this. The "filter" function expects the symbol "%" as wildcard, and
> implicit rules use the same symbol, too. Unfortunately, this binds the
> "%"-symbol within the rule for the "filter"-function, thus making it filter
> only one specific thing rather than all strings matching a pattern. How can
> I solve this?
>
> 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. But note that omake is broken in
this respect (last time I checked, and compared to Make).
I wrote about this problem to this mailing list a while ago, but saw
no response. 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.
--
David Kågedal
More information about the Omake
mailing list