%% Jon Chatten <[EMAIL PROTECTED]> writes: jc> Hi, jc> I'm using GNU make 3.80 on Windows, but am having some jc> issues with Dynamic Rules. This is probably down to jc> my own misunderstanding, but consider the following jc> (contrived! I do have a reason for trying this :-)) jc> example:
jc> ALL : TEST jc> define test-rule jc> $(1)/%.o : %.c jc> @echo test-rule jc> @echo Arg 1 : $(1) jc> @echo Target : $@ jc> @echo Dependent : $< jc> endef jc> TEST : bin/File.o jc> bin/File.o : File.c jc> $(eval $(call test-rule,bin)) jc> Which leads me to believe the rule is created jc> correctly and invoked as you'd expect, but why are $< jc> and $@ empty? Because call is evaluating them, and at that time they have no value. You have to escape them ($$@ etc.) if you want the references to the variable to survive into the eval step. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
