[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Handling make errors
From: |
Paul D. Smith |
Subject: |
Re: Handling make errors |
Date: |
Mon, 20 Mar 2006 15:10:25 -0500 |
%% Rani Pinchuk <address@hidden> writes:
rp> It is very simple to add a sound when the built is successful - by
rp> adding play command in the end of the building block.
You can easily add a sound when the build fails using the same methods.
Just as with all UNIX commands, make will exit with a success code (0)
when it works, and an error code (non-0) when it fails.
All you have to do is wrap make in a script that checks for this and
plays the proper sound.
rp> But I could not find anywhere a way to handle make errors. I have
rp> looked in the manual of Make and in the mailing list archive and
rp> could not find how to do this. Obviously I can wrap make with
rp> whatever other application to catch those errors, but I would
rp> imagine there is a way to handle make errors within make.
There's no way to handle errors from within make. Only by checking the
exit code can you deal with errors.
--
-------------------------------------------------------------------------------
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