From be95d4c131c77192f1033f051563ca2cc20e32b1 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 4 Nov 2010 00:50:44 +0200 Subject: 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. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 1310ff74d1..e34f2dd7c0 100644 --- a/Makefile +++ b/Makefile @@ -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: -- cgit v1.2.3