From patchwork Mon Dec 7 19:04:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 40524 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4B49BB6F0D for ; Tue, 8 Dec 2009 06:48:03 +1100 (EST) Received: from localhost ([127.0.0.1]:34716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHjYu-0000wD-Ha for incoming@patchwork.ozlabs.org; Mon, 07 Dec 2009 14:48:00 -0500 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 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB7J7Ykt009386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Dec 2009 14:07:35 -0500 Received: from redhat.com (vpn-6-93.tlv.redhat.com [10.35.6.93]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id nB7J7WYX019631; Mon, 7 Dec 2009 14:07:33 -0500 Date: Mon, 7 Dec 2009 21:04:52 +0200 From: "Michael S. Tsirkin" To: Anthony Liguori , qemu-devel@nongnu.org Message-ID: <20091207190452.GA8175@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] qemu: delete rule target on error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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: