Hello all,

How can I stop a build process based on the outcome of a shell script?
What I want to do is to run a script that verifies some of my code. If the script succeeds, then I would continue to the next step, but if it fails, I want to stop the make process.

First things first. How can I know if my script succeeded or not?? I've tried reading and printing the $? environment variable. Here's what I've tried with a script that should always fail.

e.g:
   @$(shell /path/to/my/script.sh)
   @echo "result: $$?"

The line always prints "result: 0", regardless of the result. When I run this same script on the console, and then echo the $? variable, I always get the error code I'm hoping for. If you have any suggestions on how to know the outcome of a script w/out using the $? environment variable, please let me know. Thank you in advance.


German








_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to