Say I have the following files:
buggy_program:
#!/bin/sh echo \"wops, some bug made me exit with failure\" exit 1
Makefile:
<
You could do:
SHELL=/bin/bash .DELETE_ON_ERROR: file.gz: set -o pipefail; buggy_program | gzip -9 -c >$@
but this only work with bash.