[Omake] Meaning of $*

David Kågedal david at virtutech.se
Wed Sep 20 06:02:41 PDT 2006


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 $@ $<

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