Skip to contentSkip to conversation

qemu: delete rule target on error

PATCH New Michael S. Tsirkin 1 participant 1 message Dec 7, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 rules.mak |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
rules.mak +3 -0
index 16713ba..5d9f684 100644
@@ -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:
Signature · 1 line
1.6.5.2.143.g8cc62