From: Stefan Weil <sw@weilnetz.de>
To: Anthony Liguori <aliguori@amazon.com>
Cc: Stefan Weil <sw@weilnetz.de>, qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH for 1.7 2/3] configure: Add config.status to recreate the current configuration
Date: Thu, 7 Nov 2013 07:15:08 +0100 [thread overview]
Message-ID: <1383804909-376-3-git-send-email-sw@weilnetz.de> (raw)
In-Reply-To: <1383804909-376-1-git-send-email-sw@weilnetz.de>
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>
---
Makefile | 9 ++++++++-
configure | 15 +++++++++++++--
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index b15003f..073f18b 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,14 @@ CONFIG_ALL=y
include $(SRC_PATH)/rules.mak
config-host.mak: $(SRC_PATH)/configure
@echo $@ is out-of-date, running configure
- @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
+ @# TODO: The next lines include code which supports a smooth
+ @# transition from old configurations without config.status.
+ @# This code can be removed after QEMU 1.7.
+ @if test -x config.status; then \
+ ./config.status; \
+ else \
+ sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh; \
+ fi
else
config-host.mak:
ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
diff --git a/configure b/configure
index 9addff1..a1cc5be 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
--
1.7.10.4
next prev parent reply other threads:[~2013-11-07 6:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 6:15 [Qemu-devel] [PULL for 1.7] Three unsorted patches Stefan Weil
2013-11-07 6:15 ` [Qemu-devel] [PATCH for 1.7 1/3] nsis: Improved support for parallel installation of 32 and 64 bit code Stefan Weil
2013-11-07 6:15 ` Stefan Weil [this message]
2013-11-07 6:15 ` [Qemu-devel] [PATCH for 1.7 3/3] linux-user: Fix stat64 syscall for SPARC64 Stefan Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383804909-376-3-git-send-email-sw@weilnetz.de \
--to=sw@weilnetz.de \
--cc=aliguori@amazon.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).