From 7dbbbb0c9e4313cf2d2f6559b7899259fb09eb63 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Mon, 7 Dec 2009 21:04:52 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- rules.mak | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rules.mak') 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: -- cgit v1.2.1