[Omake] Re: Meaning of $*
David Kågedal
david at virtutech.se
Wed Nov 29 09:55:52 PST 2006
David Kågedal <david at virtutech.se> writes:
> Is there a reason why $* is defined differently in omake than in GNU
> make?
>
> In an implicit rule, $* expands to whatever % matched.
>
> foo-%.o : bar-%.c
> $(CC) -DBASE=% -c -o $@ $<
I guess what I meant here was -DBASE=$*
> In GNU Make, running "make foo-xxx.o" will run
>
> cc -DBASE=xxx -c -o foo-xxx.o bar-xxx.c
>
> (provided that bar-xxx.c exists, of course). But omake will run
>
> cc -DBASE=foo-xxx -c -o foo-xxx.o bar-xxx.c
>
> since $* is defined to be the "target name without suffix". I think
> this definition is less useful for implicit rules.
--
David Kågedal, Virtutech
More information about the Omake
mailing list