summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-10-20 18:39:21 +0200
committerStefan Weil <sw@weilnetz.de>2013-11-07 07:02:44 +0100
commitbdf523e6923f1e667055e947e71fc600549cefae (patch)
tree5c0840d15fd34aef54b88c87f66895a224787ced /configure
parent40b9cc5e40ca69c15a2243852fa20fd1a35a0ea6 (diff)
downloadqemu-bdf523e6923f1e667055e947e71fc600549cefae.tar.gz
configure: Add config.status to recreate the current configuration
The latest configure invocation was saved in config-host.mak and could be extracted from that file to recreate the configuration. Now it is saved in a new file config.status which can be directly executed to recreate the configuration. The file name and the comments were copied from GNU autoconf. Makefile now uses config.status, but also includes transitional code for the old mechanism. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 13 insertions, 2 deletions
diff --git a/configure b/configure
index 9addff190a..a1cc5be69e 100755
--- a/configure
+++ b/configure
@@ -27,6 +27,19 @@ 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"
@@ -3757,8 +3770,6 @@ config_host_mak="config-host.mak"
echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
echo "# Automatically generated by configure - do not modify" > $config_host_mak
-printf "# Configured with:" >> $config_host_mak
-printf " '%s'" "$0" "$@" >> $config_host_mak
echo >> $config_host_mak
echo all: >> $config_host_mak