]> git.tuebingen.mpg.de Git - lopsub.git/blobdiff - Makefile
build: Activate .DELETE_ON_ERROR.
[lopsub.git] / Makefile
index c0057a38b89119897044caa0a1eaa705877989ca..31c2102a940a2ec372f78d5906e9da48852d6fc7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,13 @@ endif
 .ONESHELL:
 .SHELLFLAGS := -ec
 
+# Recipes which redirect stdout to the target of the rule (i.e., constructs
+# like cmd > $@) create empty or incomplete output files if the command fails,
+# for example when cmd was not found. Since the target exists and is uptodate
+# in this case, this may lead to all sorts of problems. The following target
+# makes sure that such files are removed.
+.DELETE_ON_ERROR:
+
 PREFIX ?= /usr/local
 M4 := m4
 LN := ln -f