qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] qemu: delete rule target on error


From: Michael S. Tsirkin
Subject: [Qemu-devel] [PATCH] qemu: delete rule target on error
Date: Mon, 7 Dec 2009 21:04:52 +0200
User-agent: Mutt/1.5.19 (2009-01-05)

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 <address@hidden>
---
 rules.mak |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/rules.mak b/rules.mak
index 16713ba..5d9f684 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:
-- 
1.6.5.2.143.g8cc62




reply via email to

[Prev in Thread] Current Thread [Next in Thread]