aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-05-19 19:32:56 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-05-19 20:39:53 +0200
commitb0fcc6fc7fc11278c8ca344d8d9c6e5d05742f79 (patch)
tree78c80ce39ff11c7c04ccaac0ebe74760a34fd43b /Makefile
parentc673f3d0fe87f6e23a259c620fba7fc9e9d3621f (diff)
build: rebuild build.ninja using "meson setup --reconfigure"
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 3c7d67142f..08fb6a3b05 100644
--- 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