aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-03-09 17:37:49 +0200
committerMichael S. Tsirkin <mst@redhat.com>2014-03-11 13:27:26 +0200
commitdc655404659def26fbcd66583ca61575af9da8b9 (patch)
tree26626c68c9fd99adf423aadfb287321d92131326 /configure
parentac41881b48858b279960a17c07f0b159af91e75a (diff)
configure: don't modify .status on error
./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 <mst@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 14 insertions, 13 deletions
diff --git a/configure b/configure
index 8689435ccf..3ae57d7480 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 <<EOD >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 <<EOD >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
+