qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu: delete rule target on error
@ 2009-12-07 19:04 Michael S. Tsirkin
  0 siblings, 0 replies; only message in thread
From: Michael S. Tsirkin @ 2009-12-07 19:04 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel

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>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-07 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07 19:04 [Qemu-devel] [PATCH] qemu: delete rule target on error Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).