[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make is setting exit code to 0 when gcc command fails
From: |
David Aldrich |
Subject: |
make is setting exit code to 0 when gcc command fails |
Date: |
Mon, 9 Feb 2015 16:19:38 +0000 |
Hi
I want to call make from a Python script and check make's exit code to decide
whether the make succeeded.
If I deliberately introduce a syntax error into one of my C files, make calls
gcc to build the file, as expected, and an error is reported as text in bash.
However, the exit code (checked using echo $?) returns 0. If I run the gcc
command from the bash command line, the exit code is 1.
Why might make return 0 instead of 1 in the case of this compiler error?
I am running gnu make 3.81 on Centos 5, with a bash shell.
Best regards
David
- make is setting exit code to 0 when gcc command fails,
David Aldrich <=