Delete target file if command fails.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 26 Nov 2012 23:35:38 +0200
changeset 260 5f6befed263c
parent 259 30d215edc412
child 261 30c6f0eb02db
Delete target file if command fails.
Makefile
--- a/Makefile	Mon Nov 26 22:29:32 2012 +0200
+++ b/Makefile	Mon Nov 26 23:35:38 2012 +0200
@@ -14,6 +14,9 @@
 #   prefix      Prefix to install path.
 #   DESTDIR     Prefix to 'prefix' variable value.
 
+################################################################
+# Standard GNU Makefile settings.
+
 SHELL = /bin/sh
 export PATH := /bin:/usr/bin:${PATH}
 
@@ -23,6 +26,8 @@
 MAKEFLAGS += -R
 # Disable built in suffix rules.
 .SUFFIXES:
+# Delete target file if command fails.
+.DELETE_ON_ERROR:
 # Default target.
 .DEFAULT_GOAL = help