aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-12-07 21:04:52 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-07 16:34:37 -0600
commit7dbbbb0c9e4313cf2d2f6559b7899259fb09eb63 (patch)
treebd0a55af3c067e7ed6e2bb2c1ea0792a5f145897
parent77e595e7c613c495714d04ce63fb9bce263c29ae (diff)
qemu: delete rule target on error
Instruct make to remove any rule target on error. This prevetns situation where there was an error during build but generated file still stays behind. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--rules.mak3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules.mak b/rules.mak
index 16713bacd7..5d9f684c24 100644
--- a/rules.mak
+++ b/rules.mak
@@ -47,3 +47,6 @@ cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
%.h-timestamp: %.mak
$(call quiet-command, sh $(SRC_PATH)/create_config < $< > $@, " GEN $*.h")
@cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h
+
+# will delete the target of a rule if commands exit with a nonzero exit status
+.DELETE_ON_ERROR: