%% "Anoni" <[EMAIL PROTECTED]> writes: a> How do you get the value of a shell variable (e.g, exit number) in an a> $(eval) context?
I think you're confused about what eval does. It does not _run_ a makefile. It only evaluates it: reads it in so that it's now part of make's internal database. a> define TEMPLATE a> $(1) : blah blah...; \ a> @some_command; \ a> exit_status=...; \ a> if [ ... != 0 ]; then \ a> exit 1; \ a> fi; \ a> touch $$@; a> endef a> $(foreach t,$(targets),$(eval $(call TEMPLATE,$(t)))) This identical to writing the contents of the TEMPLATE variable out by hand, once for each word in $(targets). Neither more nor less. Maybe if you described what you were actually trying to do we could give you better advice. -- ------------------------------------------------------------------------------- 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://mail.gnu.org/mailman/listinfo/help-make
