qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Stefan Hajnoczi" <stefanha@gmail.com>,
	qemu-devel@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
	"Liviu Ionescu" <ilg@livius.net>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Michal Suchánek" <msuchanek@suse.de>,
	"Aleksandar Markovic" <aleksandar.m.mail@gmail.com>
Subject: Re: [PATCH] configure: warn if not using a separate build directory
Date: Tue, 31 Mar 2020 12:41:03 +0100	[thread overview]
Message-ID: <20200331114103.GE353752@redhat.com> (raw)
In-Reply-To: <9b81074d-b9c8-8392-19a2-2f377224b66f@redhat.com>

On Tue, Mar 31, 2020 at 01:11:45PM +0200, Philippe Mathieu-Daudé wrote:
> On 3/31/20 12:37 PM, Daniel P. Berrangé wrote:
> > Running configure directly from the source directory is a build
> > configuration that will go away in future. It is also not currently
> > covered by any automated testing. Display a deprecation warning if
> > the user attempts to use an in-srcdir build setup, so that they are
> > aware that they're building QEMU in an undesirable manner.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >   configure | 30 ++++++++++++++++++++++++++++++
> >   1 file changed, 30 insertions(+)
> > 
> > diff --git a/configure b/configure
> > index e225a1e3ff..1ab7492ab5 100755
> > --- a/configure
> > +++ b/configure
> > @@ -3,6 +3,19 @@
> >   # qemu configure script (c) 2003 Fabrice Bellard
> >   #
> > +BUILDDIR=$(pwd)
> > +SRCDIR=$(dirname "$0")
> 
> This duplicates $source_path.
> Maybe you can rename it $source_path and remove the $source_path assignment
> later.

Sure, could do that..

> 
> > +
> > +ABS_BUILDDIR=$(realpath $BUILDDIR)
> > +ABS_SRCDIR=$(realpath $SRCDIR)
> > +
> > +in_srcdir=no
> > +if [ "$ABS_SRCDIR" == "$ABS_BUILDDIR" ]
> > +then
> > +    in_srcdir=yes
> > +fi
> > +
> > +
> >   # Unset some variables known to interfere with behavior of common tools,
> >   # just as autoconf does.
> >   CLICOLOR_FORCE= GREP_OPTIONS=
> > @@ -6799,6 +6812,23 @@ if test "$supported_os" = "no"; then
> >       echo "us upstream at qemu-devel@nongnu.org."
> >   fi
> > +if test "$in_srcdir" = "yes"; then
> > +    echo
> > +    echo "WARNING: SUPPORT FOR IN SOURCE DIR BUILDS IS DEPRECATED"
> > +    echo
> > +    echo "Support for running the 'configure' script directly from the"
> > +    echo "source directory is deprecated and will go away in a future"
> > +    echo "release. In source dir builds are not covered by automated"
> > +    echo "testing and are liable to break without warning. Users are"
> > +    echo "strongly recommended to switch to a separate build directory:"
> > +    echo
> > +    echo "  $ mkdir build"
> > +    echo "  $ cd build"
> > +    echo "  $ ../configure"
> > +    echo "  $ make"
> > +    echo
> > +fi
> 
> I'd move it at the very end of the file, to be the last thing displayed.

You can't see it from the diff, but immediately before here are a bunch
of other big warnings for users, so I figured it was a good idea to keep
them all together.

> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> > +
> >   config_host_mak="config-host.mak"
> >   echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
> > 
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2020-03-31 11:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 10:37 [PATCH] configure: warn if not using a separate build directory Daniel P. Berrangé
2020-03-31 11:11 ` Philippe Mathieu-Daudé
2020-03-31 11:41   ` Daniel P. Berrangé [this message]
2020-03-31 12:56     ` Philippe Mathieu-Daudé
2020-03-31 14:44 ` Eric Blake
2020-03-31 14:56   ` Daniel P. Berrangé
2020-03-31 15:51     ` Kevin Wolf
2020-03-31 15:10   ` BALATON Zoltan
2020-04-01  3:03 ` Carlo Arenas

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=20200331114103.GE353752@redhat.com \
    --to=berrange@redhat.com \
    --cc=aleksandar.m.mail@gmail.com \
    --cc=armbru@redhat.com \
    --cc=ilg@livius.net \
    --cc=kwolf@redhat.com \
    --cc=msuchanek@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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).