On Sun, 2006-06-11 at 19:24 +0200, Wouter van Ooijen wrote: > > If there is an error (the exit status is nonzero), `make' gives up on > > the current rule, and perhaps on all rules." > > Wouter, you NEED to RTM, it's all there ! > > Probably, but you might RTFQ (read the fucking question) too :) (NOTE I didn't use RT"F"M out of respect !) You asked "And then the last 1/3: how do I stop the makefile execution?" That's what I was answering.... So you see I HAD RTFQ, however you seem to only be interested in posts if they answer all 3 of your questions ? Anyway..... > > I haven't (recently) read the manual all over, but I did search for > obvious command names or constructs like fail, exit, fence, etc. > > I am *not inside a rule*. Can you post the makefile so we can see where you are if "not in a rule" ? > I don't have a rule for this, nor do I have an > obvious choice for a command that would have the dirty task of failing. You could add another target that all your real target depend on, and put your tests in there, and make them return a failure if the required conditions aren't met, then make will stop at that point. > I am evaluating if's, to check whether the user has given a correct set > of macro definitions. I'd like to give him an appropriate error message > before make starts execution any rules that could cause other error > messages. > > Or is this something that should definitely not be done in make? An alternative is to use the rest of the automake tools. Tests are then defined in "configure.in" For example I use AM_CONDITIONAL(X86_64, test "$host_cpu" = "x86_64") to set the flag X86_64 which can be tested for in makefile.am However, the learning curve for using the automake tools is quite steep, and probably not justified for your current problem. Peter -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist