On Tue, 2023-12-05 at 13:43 +0100, Sébastien Hinderer wrote: > Is there a recommended way to catch errors in pipelines of coommands > that are used in recipes, please?
This isn't a GNU Make issue. It's a shell programming issue. Make just invokes the shell and waits for it to exit, then looks at the exit code. If you want the behavior of pipefail you have to get your recipe to implement that behavior: there's nothing make can do about it. I recommend checking on StackOverflow or similar places looking for idioms that will support this for POSIX shells. Just to note, starting with the next POSIX version, set -o pipefail is part of the standard so you can expect it to start appearing in POSIX- conforming shells that don't already support it. Of course, that doesn't help if you must support older shells. -- Paul D. Smith <psm...@gnu.org> Find some GNU Make tips at: https://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist