You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if you run make foo, and some-command fails, foo will be created, and make will exit with a status of 0. Furthermore, a subsequent run of make foo will claim that foo is up-to-date.
We could improve this situation by setting either SHELL or .SHELLFLAGS to enforce Bash's pipefail option. This will cause make to exit with a non-zero status when some-command fails. Unfortunately the foo file will still be created on error, so this doesn't completely solve the issue. We might also want to consider using .DELETE_ON_ERROR, which should in theory handle this last part of the problem.
The text was updated successfully, but these errors were encountered:
Say you have a target like this:
Currently, if you run
make foo
, andsome-command
fails,foo
will be created, andmake
will exit with a status of0
. Furthermore, a subsequent run ofmake foo
will claim thatfoo
is up-to-date.We could improve this situation by setting either
SHELL
or.SHELLFLAGS
to enforce Bash'spipefail
option. This will causemake
to exit with a non-zero status whensome-command
fails. Unfortunately thefoo
file will still be created on error, so this doesn't completely solve the issue. We might also want to consider using.DELETE_ON_ERROR
, which should in theory handle this last part of the problem.The text was updated successfully, but these errors were encountered: