[PATCH] configure: fix backwards-compatibility for meson sphinx_build option

Paolo Bonzini posted 1 patch 11 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230519180812.1181871-1-pbonzini@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Thomas Huth <thuth@redhat.com>
configure | 8 ++++++++
1 file changed, 8 insertions(+)
[PATCH] configure: fix backwards-compatibility for meson sphinx_build option
Posted by Paolo Bonzini 11 months, 3 weeks ago
Reintroduce the cmd_line.txt mangling to remove the sphinx_build
option when rerunning meson.  The mechanism was removed in
commit 75cc28648574 ("configure: remove backwards-compatibility code", 2023-01-11)
because it was obsolete at the time, but the Meson deprecation
mechanism doesn't quite work when options are finally removed.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure b/configure
index 43620b80c8df..b61475a4cb5d 100755
--- a/configure
+++ b/configure
@@ -1984,6 +1984,14 @@ if test "$skip_meson" = no; then
   if test "$?" -ne 0 ; then
       error_exit "meson setup failed"
   fi
+else
+  if test -f meson-private/cmd_line.txt; then
+    # Adjust old command line options that were removed
+    # sed -i is not portable
+    perl -i -ne '
+      /^sphinx_build/ && next;
+      print;' meson-private/cmd_line.txt
+  fi
 fi
 
 # Save the configure command line for later reuse.
-- 
2.40.1
Re: [PATCH] configure: fix backwards-compatibility for meson sphinx_build option
Posted by Peter Maydell 11 months, 3 weeks ago
On Fri, 19 May 2023 at 19:08, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Reintroduce the cmd_line.txt mangling to remove the sphinx_build
> option when rerunning meson.  The mechanism was removed in
> commit 75cc28648574 ("configure: remove backwards-compatibility code", 2023-01-11)
> because it was obsolete at the time, but the Meson deprecation
> mechanism doesn't quite work when options are finally removed.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

This plus the Makefile patch from the other email thread
are sufficient for the incremental make to work again.

Tested-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM