I have a C project built with gnu-make.

as part of the build process I run some python scripts. the scripts may return an error (with sys.exit(1) for example).

I wish to stop the build process immediately after an error returned from a python script but not after a "normal" compilation error.

when I run make with -k, it keeps going after an error from python or compilation, and without it it stops on the first error in all cases...

any way to accomplish what I'm looking for?

Thanks.