Chris Cross wrote: > Trying to understand how $(error) works. The manual says "error is > generated whenever this function is evaluated." With the makefile below I > would expect to see output from line1 of the recipe but only see output > from $(error). > # error.mk > .PHONY: target > > target: > @echo recipe line 1 > $(error debug exit recipe line 2) > > $ make -f error.mk > error.mk:5: *** debug exit recipe line 2. Stop.
Make immediately terminates when it sees the $(error) function. And it evaluates functions _before_ running any reciepe. Just replace error with warning: Then, you'll see both the evaluation of the $(warning) function (first!), and _then_ the execution of the reciepe. Cheers, Christof _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
