[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/17] configure: add --ninja option
From: |
Paolo Bonzini |
Subject: |
[PULL 10/17] configure: add --ninja option |
Date: |
Thu, 27 Aug 2020 12:59:49 -0400 |
On Windows it is not possible to invoke a Python script as $NINJA.
If ninja is present use it directly, while if it is not we can
keep using ninjatool.
Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 9db9bb89b9..6ecaff429b 100755
--- a/configure
+++ b/configure
@@ -568,6 +568,7 @@ rng_none="no"
secret_keyring=""
libdaxctl=""
meson=""
+ninja=""
skip_meson=no
gettext=""
@@ -1052,6 +1053,8 @@ for opt do
;;
--meson=*) meson="$optarg"
;;
+ --ninja=*) ninja="$optarg"
+ ;;
--smbd=*) smbd="$optarg"
;;
--extra-cflags=*)
@@ -1820,6 +1823,7 @@ Advanced options (experts only):
--python=PYTHON use specified python [$python]
--sphinx-build=SPHINX use specified sphinx-build [$sphinx_build]
--meson=MESON use specified meson [$meson]
+ --ninja=NINJA use specified ninja [$ninja]
--smbd=SMBD use specified smbd [$smbd]
--with-git=GIT use specified git [$git]
--static enable static build [$static]
@@ -2058,6 +2062,16 @@ case "$meson" in
*) meson=$(command -v meson) ;;
esac
+# Probe for ninja (used for compdb)
+
+if test -z "$ninja"; then
+ for c in ninja ninja-build samu; do
+ if has $c; then
+ ninja=$(command -v "$c")
+ break
+ fi
+ done
+fi
# Check that the C compiler works. Doing this here before testing
# the host CPU ensures that we had a valid CC to autodetect the
@@ -8197,7 +8211,7 @@ fi
mv $cross config-meson.cross
rm -rf meson-private meson-info meson-logs
-NINJA=$PWD/ninjatool $meson setup \
+NINJA=${ninja:-$PWD/ninjatool} $meson setup \
--prefix "${pre_prefix}$prefix" \
--libdir "${pre_prefix}$libdir" \
--libexecdir "${pre_prefix}$libexecdir" \
--
2.26.2
- [PULL 00/17] Meson fixes for 2020-08-27, Paolo Bonzini, 2020/08/27
- [PULL 01/17] trace: fix creation of systemtap files, Paolo Bonzini, 2020/08/27
- [PULL 02/17] meson: Build qemu-nbd on macOS again, Paolo Bonzini, 2020/08/27
- [PULL 03/17] meson: Don't make object files for dtrace on macOS, Paolo Bonzini, 2020/08/27
- [PULL 04/17] scripts/qemu-version.sh: Add missing space before ']', Paolo Bonzini, 2020/08/27
- [PULL 08/17] meson: move pixman detection to meson, Paolo Bonzini, 2020/08/27
- [PULL 10/17] configure: add --ninja option,
Paolo Bonzini <=
- [PULL 11/17] meson: cleanup xkbcommon detection, Paolo Bonzini, 2020/08/27
- [PULL 06/17] meson: Fix chardev-baum.so name, Paolo Bonzini, 2020/08/27
- [PULL 05/17] meson: Fix meson build with --enable-libdaxctl, Paolo Bonzini, 2020/08/27
- [PULL 09/17] meson: skip SDL2 detection if --disable-system, Paolo Bonzini, 2020/08/27
- [PULL 16/17] meson: set colorout to auto, Paolo Bonzini, 2020/08/27
- [PULL 15/17] meson: Mingw64 gcc doesn't recognize system include_type for sdl2, Paolo Bonzini, 2020/08/27
- [PULL 13/17] ninjatool: quote dollars in variables, Paolo Bonzini, 2020/08/27
- [PULL 07/17] configure: default to PIE disabled on Windows platforms, Paolo Bonzini, 2020/08/27
- [PULL 14/17] meson: fix relpath failure on Win32, Paolo Bonzini, 2020/08/27
- [PULL 12/17] meson: don't require CONFIG_VTE for the GTK UI, Paolo Bonzini, 2020/08/27