[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make does not stop on error
From: |
Paul D. Smith |
Subject: |
Re: make does not stop on error |
Date: |
Tue, 2 May 2006 16:01:36 -0400 |
%% Eli Zaretskii <address@hidden> writes:
>> ----- makefile
>> all: T1 T2
>> T1:; exit 101
>> T2:; exit 202
>> -include T2
>> ----- make 3.81.90:
>> exit 202
>> exit 101
>> ~make: *** [T1] Error 101
ez> Paul, is this true that there has been a change in behavior in
ez> this regard? I could find nothing about this in NEWS, FWIW.
Yes, there was a change in behavior. It was not necessarily
intentional, but came about as a side effect of some other changes, so I
didn't put it into the NEWS file; there is a bug report (IIRC) about
this but I haven't fully decided if it's really a bug, or in fact
correct behavior.
Since "T2" was already tried (and failed) during the "reading makefiles"
phase, and then the error was ignored... it's not clear exactly how this
should work.
Actually, in the example above the way make 3.81 works is pretty clearly
correct.
The real question becomes if you switch T1 and T2 around...
all: T2 T1
T1:; exit 101
T2:; exit 202
-include T2
Now, you get the first "exit 202" as part of the include, which is
ignored. Then, should make try to run "exit 202" again for T2 because
of the all: target, and fail? Or should it skip that target since it
was already built, and continue on to "exit 101"?
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> 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