[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU make exitcode
From: |
Paul D. Smith |
Subject: |
Re: GNU make exitcode |
Date: |
Wed, 14 Mar 2001 12:25:51 -0500 |
%% jacques klein <address@hidden> writes:
jk> Is there a reason why make returns always with an exitcode of 0, even
jk> when an error occured ?.
It doesn't. See the GNU make manual for a description of the exit code
values, or try it:
$ echo 'all: ; false' | make -f-
false
make: *** [all] Error 1
$ echo $?
2
jk> In a shell script, or make calling make, what is the `good' way to
jk> check for errors ?.
Sounds like your shell script is buggy.
Remember that any command run after the make will reset the exit code,
so if you pipe the output of make to tee or grep or some other program,
you're seeing the exit code of tee or grep or the other program, not
make.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist