From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8TWw-00084k-PZ for qemu-devel@nongnu.org; Fri, 26 Jun 2015 09:18:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8TWs-0002qo-JZ for qemu-devel@nongnu.org; Fri, 26 Jun 2015 09:18:54 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:33880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8TWs-0002qS-89 for qemu-devel@nongnu.org; Fri, 26 Jun 2015 09:18:50 -0400 Received: by wicnd19 with SMTP id nd19so45177357wic.1 for ; Fri, 26 Jun 2015 06:18:48 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <558D5136.9070909@redhat.com> Date: Fri, 26 Jun 2015 15:18:46 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1435271931-28447-1-git-send-email-marcandre.lureau@gmail.com> In-Reply-To: <1435271931-28447-1-git-send-email-marcandre.lureau@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] build-sys: keep current config.log on --help List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= , qemu-devel@nongnu.org On 26/06/2015 00:38, Marc-André Lureau wrote: > It's nice to keep the config.log used to configure the build. > > Signed-off-by: Marc-André Lureau > --- > configure | 35 +++++++++++++++++++---------------- > 1 file changed, 19 insertions(+), 16 deletions(-) > > diff --git a/configure b/configure > index 1626c2e..dcd15a9 100755 > --- a/configure > +++ b/configure > @@ -29,14 +29,7 @@ TMPL="${TMPDIR1}/${TMPB}.lo" > TMPA="${TMPDIR1}/lib${TMPB}.la" > TMPE="${TMPDIR1}/${TMPB}.exe" > > -rm -f config.log > - > -# Print a helpful header at the top of config.log > -echo "# QEMU configure log $(date)" >> config.log > -printf "# Configured with:" >> config.log > -printf " '%s'" "$0" "$@" >> config.log > -echo >> config.log > -echo "#" >> config.log > +CONFIG_LOG="/dev/null" > > error_exit() { > echo > @@ -54,8 +47,8 @@ do_compiler() { > # is compiler binary to execute. > local compiler="$1" > shift > - echo $compiler "$@" >> config.log > - $compiler "$@" >> config.log 2>&1 || return $? > + echo $compiler "$@" >> "$CONFIG_LOG" > + $compiler "$@" >> "$CONFIG_LOG" 2>&1 || return $? > # Test passed. If this is an --enable-werror build, rerun > # the test with -Werror and bail out if it fails. This > # makes warning-generating-errors in configure test code > @@ -69,8 +62,8 @@ do_compiler() { > return 0 > ;; > esac > - echo $compiler -Werror "$@" >> config.log > - $compiler -Werror "$@" >> config.log 2>&1 && return $? > + echo $compiler -Werror "$@" >> "$CONFIG_LOG" > + $compiler -Werror "$@" >> "$CONFIG_LOG" 2>&1 && return $? > error_exit "configure test passed without -Werror but failed with -Werror." \ > "This is probably a bug in the configure script. The failing command" \ > "will be at the bottom of config.log." \ > @@ -117,8 +110,8 @@ do_libtool() { > local mode=$1 > shift > # Run the compiler, capturing its output to the log. > - echo $libtool $mode --tag=CC $cc "$@" >> config.log > - $libtool $mode --tag=CC $cc "$@" >> config.log 2>&1 || return $? > + echo $libtool $mode --tag=CC $cc "$@" >> "$CONFIG_LOG" > + $libtool $mode --tag=CC $cc "$@" >> "$CONFIG_LOG" 2>&1 || return $? > # Test passed. If this is an --enable-werror build, rerun > # the test with -Werror and bail out if it fails. This > # makes warning-generating-errors in configure test code > @@ -132,8 +125,8 @@ do_libtool() { > return 0 > ;; > esac > - echo $libtool $mode --tag=CC $cc -Werror "$@" >> config.log > - $libtool $mode --tag=CC $cc -Werror "$@" >> config.log 2>&1 && return $? > + echo $libtool $mode --tag=CC $cc -Werror "$@" >> "$CONFIG_LOG" > + $libtool $mode --tag=CC $cc -Werror "$@" >> "$CONFIG_LOG" 2>&1 && return $? > error_exit "configure test passed without -Werror but failed with -Werror." \ > "This is probably a bug in the configure script. The failing command" \ > "will be at the bottom of config.log." \ > @@ -1384,6 +1377,16 @@ EOF > exit 0 > fi > > +rm -f config.log > + > +# Print a helpful header at the top of config.log > +echo "# QEMU configure log $(date)" >> config.log > +printf "# Configured with:" >> config.log > +printf " '%s'" "$0" "$@" >> config.log > +echo >> config.log > +echo "#" >> config.log > +CONFIG_LOG="config.log" > + > # Now we have handled --enable-tcg-interpreter and know we're not just > # printing the help message, bail out if the host CPU isn't supported. > if test "$ARCH" = "unknown"; then > Applied, thanks! Paolo