[Vm-dev] Make question

Andreas Raab andreas.raab at gmx.de
Tue Sep 5 18:09:26 UTC 2006


piumarta at speakeasy.net wrote:
>> Something special about $* in ifeq?
> 
> The automatic variables ($@, $< $*, etc.) are only valid within the rule(s) of an implicit template.  Conditionals are not rules, so automatic variables are meaningless to (and are not defined within) them.

Ouch. That stinks. But it sure as hell explains it.

> If you have to use automatic variables to construct the path to an optional file then I think I would suggest Dave's approach that puts the test into a shell command run from within the rule proper, where the $* makes sense and wil be correctly substituted.

This is windows so shell commands are tricky (I'm not going to require 
Cygwin etc) but I think I can solve this via recursive Makefile invokation.

Thanks for the help.

Cheers,
   - Andreas


More information about the Vm-dev mailing list