Received: from eggs.gnu.org ([2001:4830:134:3::10]:43604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMfrS-0005nT-BN for qemu-devel@nongnu.org; Sun, 09 Mar 2014 11:42:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMfrM-0005BP-Aa for qemu-devel@nongnu.org; Sun, 09 Mar 2014 11:41:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMfrM-0005BG-2U for qemu-devel@nongnu.org; Sun, 09 Mar 2014 11:41:52 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s29FfoTL014694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 9 Mar 2014 11:41:50 -0400 Received: from redhat.com (vpn1-6-71.ams2.redhat.com [10.36.6.71]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id s29Ffn8u009648 for ; Sun, 9 Mar 2014 11:41:49 -0400 Date: Sun, 9 Mar 2014 17:41:48 +0200 From: "Michael S. Tsirkin" Message-ID: <1394379565-2199-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] configure: don't modify .status on error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ./configure --help make will try to re-run configure with --help which isn't what was intended. The reason is that config.status was written even on configure error. Defer writing config.status until configure has completed successfully. Signed-off-by: Michael S. Tsirkin --- configure | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 8689435..3ae57d7 100755 --- a/configure +++ b/configure @@ -31,19 +31,6 @@ printf " '%s'" "$0" "$@" >> config.log echo >> config.log echo "#" >> config.log -# Save the configure command line for later reuse. -cat <config.status -#!/bin/sh -# Generated by configure. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. -EOD -printf "exec" >>config.status -printf " '%s'" "$0" "$@" >>config.status -echo >>config.status -chmod +x config.status - error_exit() { echo echo "ERROR: $1" @@ -5136,3 +5123,17 @@ done if test "$docs" = "yes" ; then mkdir -p QMP fi + +# Save the configure command line for later reuse. +cat <config.status +#!/bin/sh +# Generated by configure. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. +EOD +printf "exec" >>config.status +printf " '%s'" "$0" "$@" >>config.status +echo >>config.status +chmod +x config.status + -- MST