Daniel P. Berrangé <berra...@redhat.com> writes: > 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é <berra...@redhat.com> > --- > > Changed in v2: > > - Use existing $source_path variable (Eric) > - 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 > + > + > # 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"
I don't like shouted warnings, but it's consistent with what we have. > + 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 > + > config_host_mak="config-host.mak" > > echo "# Automatically generated by configure - do not modify" > >config-all-disas.mak Output is suboptimal because we run $source_path/tests/tcg/configure.sh after emitting warnings, and it's chatty: [...] plugin support no fuzzing support no gdb /usr/bin/gdb WARNING: SUPPORT FOR IN SOURCE DIR BUILDS IS DEPRECATED Support for running the 'configure' script directly from the source directory is deprecated and will go away in a future release. In source dir builds are not covered by automated testing and are liable to break without warning. Users are strongly recommended to switch to a separate build directory: $ mkdir build $ cd build $ ../configure $ make --> cross containers podman NOTE: guest cross-compilers enabled: cc cc Not this patch's fault. Reviewed-by: Markus Armbruster <arm...@redhat.com>