From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHivu-0003lM-56 for qemu-devel@nongnu.org; Mon, 07 Dec 2009 14:07:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHivp-0003hn-C5 for qemu-devel@nongnu.org; Mon, 07 Dec 2009 14:07:41 -0500 Received: from [199.232.76.173] (port=58587 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHivp-0003hk-8B for qemu-devel@nongnu.org; Mon, 07 Dec 2009 14:07:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38318) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHivo-00087B-TU for qemu-devel@nongnu.org; Mon, 07 Dec 2009 14:07:37 -0500 Date: Mon, 7 Dec 2009 21:04:52 +0200 From: "Michael S. Tsirkin" Message-ID: <20091207190452.GA8175@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] qemu: delete rule target on error List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , qemu-devel@nongnu.org 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: -- 1.6.5.2.143.g8cc62