Makefile: enable .DELETE_ON_ERROR special target

msgfmt creates the output file even if there was a fatal error. Thus
make would stop because of the error return, but the output file would
be left on disk and running make again would continue building other
files. Enable the .DELETE_ON_ERROR special target to automatically
delete target files changed by failing commands. This affects all
rules; I think it is the correct behavior for all existing rules.
This commit is contained in:
Uoti Urpala 2010-11-04 00:50:44 +02:00
parent 34454cfcd1
commit be95d4c131
1 changed files with 6 additions and 0 deletions

View File

@ -1011,3 +1011,9 @@ dhahelperclean:
# Disable suffix rules. Most of the builtin rules are suffix rules,
# so this saves some time on slow systems.
.SUFFIXES:
# If a command returns failure but changed its target file, delete the
# (presumably malformed) file. Otherwise the file would be considered to
# be up to date if make is restarted.
.DELETE_ON_ERROR: