]> git.proxmox.com Git - mirror_qemu.git/commitdiff
build: rebuild build.ninja using "meson setup --reconfigure"
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 May 2023 17:32:56 +0000 (19:32 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 May 2023 18:39:53 +0000 (20:39 +0200)
Do not use the rule in build.ninja, because the path to meson is hardcoded
in build.ninja and this breaks if meson moves (for example if the distro
meson suddenly becomes too old after an update).

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Makefile

index 3c7d67142f13f6fbef5c15db2b6d9951e286a665..08fb6a3b058a1ed5659177aab444702db4241a01 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -115,15 +115,15 @@ Makefile.ninja: build.ninja
          $(NINJA) -t query build.ninja | sed -n '1,/^  input:/d; /^  outputs:/q; s/$$/ \\/p'; \
        } > $@.tmp && mv $@.tmp $@
 -include Makefile.ninja
+endif
 
+ifneq ($(MESON),)
 # A separate rule is needed for Makefile dependencies to avoid -n
 build.ninja: build.ninja.stamp
 $(build-files):
 build.ninja.stamp: meson.stamp $(build-files)
-       $(NINJA) $(if $V,-v,) build.ninja && touch $@
-endif
+       $(MESON) setup --reconfigure $(SRC_PATH) && touch $@
 
-ifneq ($(MESON),)
 Makefile.mtest: build.ninja scripts/mtest2make.py
        $(MESON) introspect --targets --tests --benchmarks | $(PYTHON) scripts/mtest2make.py > $@
 -include Makefile.mtest