[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 for-5.0] configure: warn if not using a separate build directo
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v4 for-5.0] configure: warn if not using a separate build directory |
Date: |
Fri, 3 Apr 2020 14:53:06 +0100 |
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.
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>
---
Changed in v4:
- Adopted Eric's suggested wording
configure | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/configure b/configure
index 22870f3867..d275c36c85 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"
@@ -6751,6 +6761,22 @@ if test "$supported_os" = "no"; then
echo "us upstream at address@hidden."
fi
+if test "$in_srcdir" = "yes"; then
+ echo
+ echo "WARNING: SUPPORT FOR BUILDING IN THE SOURCE DIR IS DEPRECATED"
+ echo
+ echo "Support for running the 'configure' script directly from the"
+ echo "source directory is deprecated. In-tree builds are not covered"
+ echo "by automated testing and thus may not correctly build QEMU."
+ echo "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
Re: [PATCH v4 for-5.0] configure: warn if not using a separate build directory, Peter Maydell, 2020/04/05