]> git.proxmox.com Git - qemu.git/commitdiff
qemu: delete rule target on error
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 7 Dec 2009 19:04:52 +0000 (21:04 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 7 Dec 2009 22:36:50 +0000 (16:36 -0600)
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>
(cherry picked from commit 7dbbbb0c9e4313cf2d2f6559b7899259fb09eb63)

rules.mak

index 16713bacd75601385738f442a8fb276270953d4a..5d9f684c24b68ddc0247c72e82693811c697e5b6 100644 (file)
--- 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: