summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-04 00:50:44 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-04 01:30:42 +0200
commitbe95d4c131c77192f1033f051563ca2cc20e32b1 (patch)
treee8fb6507672020d398ea954cb7ad10057ae15219
parent34454cfcd18b4127eb1b5200e724045a581bdbf6 (diff)
downloadmpv-be95d4c131c77192f1033f051563ca2cc20e32b1.tar.bz2
mpv-be95d4c131c77192f1033f051563ca2cc20e32b1.tar.xz
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.
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
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: