automation: Check if ninja is available before building QEMU
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 7 Jul 2021 16:40:01 +0000 (17:40 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 8 Jul 2021 11:36:21 +0000 (12:36 +0100)
ninja is now required to build the latest version of QEMU, and not all
distros have a suitable version.  Skip the QEMU build when ninja is not
available.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
automation/scripts/build

index 46b6903d29221488c3ec0b6a3aaab21f0de0e866..4a1161bb944749066799d0a508cc58a2c0abbf49 100755 (executable)
@@ -45,8 +45,9 @@ if ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
     cfgargs+=("--with-system-seabios=/bin/false")
 fi
 
-# Qemu requires Python 3.5 or later
-if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))"; then
+# Qemu requires Python 3.5 or later, and ninja
+if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))" \
+        || ! type ninja; then
     cfgargs+=("--with-system-qemu=/bin/false")
 fi