RE: Catching errors in pipes

2024-03-24 Thread Cook, Malcolm
>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 lo

Re: Catching errors in pipes

2024-03-24 Thread Paul Smith
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

Re: Catching errors in pipes

2023-12-20 Thread Sébastien Hinderer
Dear Malcolm, So sorry for the late response! I just wanted to say thank you for your repsone! In what we distribute, at themoment we do not require bash for running our GNU make commands. That being said, I find all your suggestions very valuable and I think even if we don't use them in our di

RE: Catching errors in pipes

2023-12-05 Thread Cook, Malcolm
> Is there a recommended way to catch errors in pipelines of coommands that > are used in recipes, please? I use the following with good success: SHELL=/usr/bin/bash .SHELLFLAGS = -eu -o pipefail -c FWIW: I usually use the above in combination with: .ONESHELL: MAKEFLAGS += --no-builtin-rules MA