Delete target file if command fails.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 26 Nov 2012 23:40:05 +0200
changeset 599 85b103366b02
parent 598 76730a624b4b
child 600 1ed09bc8a461
child 602 a930cfd5a0e6
Delete target file if command fails.
Makefile
--- a/Makefile	Thu Nov 22 21:29:26 2012 +0200
+++ b/Makefile	Mon Nov 26 23:40:05 2012 +0200
@@ -1,3 +1,7 @@
+
+################################################################
+# Standard GNU Makefile settings.
+
 SHELL = /bin/sh -eu
 export PATH := /bin:/usr/bin:${PATH}
 
@@ -7,6 +11,8 @@
 MAKEFLAGS += -R
 # Disable built in suffix rules.
 .SUFFIXES:
+# Delete target file if command fails.
+.DELETE_ON_ERROR:
 # Default target.
 .DEFAULT_GOAL = help