* [PATCH v3] configure: warn if not using a separate build directory
@ 2020-03-31 17:16 Daniel P. Berrangé
2020-03-31 17:21 ` Eric Blake
0 siblings, 1 reply; 4+ messages in thread
From: Daniel P. Berrangé @ 2020-03-31 17:16 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Peter Maydell, Daniel P. Berrangé,
Markus Armbruster, Liviu Ionescu, Stefan Hajnoczi, Paolo Bonzini,
Michal Suchánek, Philippe Mathieu-Daudé,
Aleksandar Markovic
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 v3:
- Don't try to predict the future so much, just recommend
a separate build dir
configure | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/configure b/configure
index e225a1e3ff..b4d1b01689 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
+
+
# default parameters
cpu=""
iasl="iasl"
@@ -6799,6 +6809,22 @@ 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. In source dir builds are not"
+ echo "covered by automated testing and thus may not correctly build"
+ echo "QEMU. Users are recommended to use 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
--
2.24.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] configure: warn if not using a separate build directory
2020-03-31 17:16 [PATCH v3] configure: warn if not using a separate build directory Daniel P. Berrangé
@ 2020-03-31 17:21 ` Eric Blake
2020-03-31 18:28 ` Markus Armbruster
0 siblings, 1 reply; 4+ messages in thread
From: Eric Blake @ 2020-03-31 17:21 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Kevin Wolf, Peter Maydell, Stefan Hajnoczi, Markus Armbruster,
Liviu Ionescu, Paolo Bonzini, Michal Suchánek,
Philippe Mathieu-Daudé,
Aleksandar Markovic
On 3/31/20 12:16 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>
> ---
>
> +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. In source dir builds are not"
> + echo "covered by automated testing and thus may not correctly build"
> + echo "QEMU. Users are recommended to use a separate build directory:"
Our mails crossed. I still think this reads a bit awkwardly; maybe:
s/IN SOURCE DIR BUILDS/BUILDING IN THE SOURCE DIR/
s/In source dir builds/In-tree builds/
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] configure: warn if not using a separate build directory
2020-03-31 17:21 ` Eric Blake
@ 2020-03-31 18:28 ` Markus Armbruster
2020-03-31 19:57 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2020-03-31 18:28 UTC (permalink / raw)
To: Eric Blake
Cc: Kevin Wolf, Peter Maydell, Daniel P. Berrangé,
Liviu Ionescu, qemu-devel, Stefan Hajnoczi, Paolo Bonzini,
Michal Suchánek, Philippe Mathieu-Daudé,
Aleksandar Markovic
Eric Blake <eblake@redhat.com> writes:
> On 3/31/20 12:16 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>
>> ---
>>
>
>> +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. In source dir builds are not"
>> + echo "covered by automated testing and thus may not correctly build"
>> + echo "QEMU. Users are recommended to use a separate build directory:"
>
> Our mails crossed. I still think this reads a bit awkwardly; maybe:
>
> s/IN SOURCE DIR BUILDS/BUILDING IN THE SOURCE DIR/
> s/In source dir builds/In-tree builds/
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
Preferably with Eric's tweaks:
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] configure: warn if not using a separate build directory
2020-03-31 18:28 ` Markus Armbruster
@ 2020-03-31 19:57 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-31 19:57 UTC (permalink / raw)
To: Markus Armbruster, Eric Blake
Cc: Kevin Wolf, Peter Maydell, Daniel P. Berrangé,
Liviu Ionescu, qemu-devel, Stefan Hajnoczi, Paolo Bonzini,
Michal Suchánek, Aleksandar Markovic
On 3/31/20 8:28 PM, Markus Armbruster wrote:
> Eric Blake <eblake@redhat.com> writes:
>
>> On 3/31/20 12:16 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>
>>> ---
>>>
>>
>>> +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. In source dir builds are not"
>>> + echo "covered by automated testing and thus may not correctly build"
>>> + echo "QEMU. Users are recommended to use a separate build directory:"
>>
>> Our mails crossed. I still think this reads a bit awkwardly; maybe:
>>
>> s/IN SOURCE DIR BUILDS/BUILDING IN THE SOURCE DIR/
>> s/In source dir builds/In-tree builds/
>>
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> Preferably with Eric's tweaks:
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-31 19:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 17:16 [PATCH v3] configure: warn if not using a separate build directory Daniel P. Berrangé
2020-03-31 17:21 ` Eric Blake
2020-03-31 18:28 ` Markus Armbruster
2020-03-31 19:57 ` Philippe Mathieu-Daudé
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.