On Sun, Jan 05, 2003 at 18:00 +1100, Bruce Evans wrote: > > On Sat, 4 Jan 2003 [EMAIL PROTECTED] wrote: > > > In message <[EMAIL PROTECTED]>, Peter Wemm writes: > > >> No, it isn't the regression tests. It is this here in the start of stage 4: > > >> > > >> ===> usr.bin/vi > > >> *** Error code 1 (ignored) > > >> *** Error code 1 (ignored) > > >> ===> usr.bin/vis > > >> > > >> As soon as 'whereintheworld' sees an 'error code', it starts dumping that > > >> entire block to the end. If you care to find and fix the build in vi, that > > >> would solve it. > > > > I think it would be more profitable to teach "whereintheworld" about > > the "(ignored)" string, wouldn't it ? > > No; it would be more profitable to teach programmers to not ignore errors.
Amen! :] Although the above case is special from what I learnt in another message in this thread (I managed to delete it after seeing it so I cannot quote it here). ISTR that the non zero exit status comes from a tool with the following convention: 0 is "absolutely OK", 1 is "not perfect but still plausible enough to get accepted most of the time", and 2 is "a real error, never OK". So the exit code of 1 is more of a warning than an error. Ignoring _any_ non zero exit status in the Makefile is an error. The rule should instead accept success and warning messages as success while bailing out on the errors. This can be done with shell syntax as I have seen in some small test: $ sh -c 'exit 0'; [ $? -le 1 ] $ echo $? 0 $ sh -c 'exit 1'; [ $? -le 1 ] $ echo $? 0 $ sh -c 'exit 2'; [ $? -le 1 ] $ echo $? 1 $ sh -c 'exit 3'; [ $? -le 1 ] $ echo $? 1 This means: adding the "[ $? -le 1 ]" test to the Makefile rule and *not* ignoring the command's (sequence's) exit status will prevent the acceptable warning from stopping the build while real errors do break the build as one would expect from make(1). And the mentioned tool (sorry, I don't remember its name) is still able to warn those who are interested (release builders?). virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" [EMAIL PROTECTED] -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message