From patchwork Mon Dec 7 19:04:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: qemu: delete rule target on error Date: Mon, 07 Dec 2009 09:04:52 -0000 From: "Michael S. Tsirkin" X-Patchwork-Id: 40524 Message-Id: <20091207190452.GA8175@redhat.com> To: Anthony Liguori , qemu-devel@nongnu.org Cc: 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 --- 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: