All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Stefan Hajnoczi" <stefanha@gmail.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Liviu Ionescu" <ilg@livius.net>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Michal Suchánek" <msuchanek@suse.de>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Aleksandar Markovic" <aleksandar.m.mail@gmail.com>
Subject: Re: [PATCH v2] configure: warn if not using a separate build directory
Date: Tue, 31 Mar 2020 11:05:06 -0500	[thread overview]
Message-ID: <1450d802-4df8-117b-e58d-da8bf2334010@redhat.com> (raw)
In-Reply-To: <20200331155158.381585-1-berrange@redhat.com>

On 3/31/20 10:51 AM, 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>
> ---
> 
> Changed in v2:
> 
>   - Use existing $source_path variable (Eric)

Phillipe, actually - but this line isn't permanent.

>   - Remove bash-ism in comparison (Eric)
>   - Safe quoting of directory paths (Eric)
>   - Rename variables to reflect that we're applying canonicalization (Eric)
> 
>   configure | 27 +++++++++++++++++++++++++++
>   1 file changed, 27 insertions(+)
> 
> diff --git a/configure b/configure
> index e225a1e3ff..5991e0e6e5 100755
> --- a/configure
> +++ b/configure
> @@ -285,6 +285,16 @@ then
>     error_exit "main directory cannot contain spaces nor colons"
>   fi
>   
> +canon_build_path=$(realpath -- "$PWD")
> +canon_source_path=$(realpath -- "$source_path")
> +
> +in_srcdir=no
> +if [ "$canon_build_path" = "$canon_source_path" ]
> +then
> +    in_srcdir=yes
> +fi

This part is good.

> +
> +
>   # default parameters
>   cpu=""
>   iasl="iasl"
> @@ -6799,6 +6809,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:"

Per Kevin's response, we may want to tweak this wording slightly; maybe:

Support for running the 'configure' script directly from the source 
directory is deprecated.  In-tree builds are not covered by automated 
testing and are liable to break without warning.  Future releases may 
change the default location of built executables for an in-tree build, 
or drop in-tree build support altogether.  Users are strongly 
recommended to switch to a separate build directory:

> +    echo
> +    echo "  $ mkdir build"
> +    echo "  $ cd build"
> +    echo "  $ ../configure"
> +    echo "  $ make"
> +    echo
> +fi
> +
>   config_host_mak="config-host.mak"
>   
>   echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
> 

Whether we keep your wording or switch to somthing based on mine,
Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2020-03-31 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 15:51 [PATCH v2] configure: warn if not using a separate build directory Daniel P. Berrangé
2020-03-31 16:05 ` Eric Blake [this message]
2020-03-31 16:12   ` Peter Maydell
2020-03-31 16:18     ` Daniel P. Berrangé
2020-03-31 16:16 ` Markus Armbruster
2020-03-31 17:12   ` Eric Blake

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=1450d802-4df8-117b-e58d-da8bf2334010@redhat.com \
    --to=eblake@redhat.com \
    --cc=aleksandar.m.mail@gmail.com \
    --cc=armbru@redhat.com \
    --cc=berrange@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.