From 03c3ea0040fa0b4844b107d812a6498b520b98b6 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 21 Dec 2016 15:44:58 -0800 Subject: [PATCH] build: also look for ninja-build in addition to ninja The ninja binary may have other names on Linux distributions. On Fedora it's ninja-build. --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c2a9b03e7e..319bf2207f 100755 --- a/Makefile +++ b/Makefile @@ -88,12 +88,20 @@ FIRST_ARG := $(firstword $(MAKECMDGOALS)) ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) j ?= 4 +NINJA_BIN := ninja ifndef NO_NINJA_BUILD -NINJA_BUILD := $(shell ninja --version 2>/dev/null) +NINJA_BUILD := $(shell $(NINJA_BIN) --version 2>/dev/null) + +ifndef NINJA_BUILD +NINJA_BIN := ninja-build +NINJA_BUILD := $(shell $(NINJA_BIN) --version 2>/dev/null) endif + +endif + ifdef NINJA_BUILD PX4_CMAKE_GENERATOR ?= "Ninja" - PX4_MAKE = ninja + PX4_MAKE = $(NINJA_BIN) PX4_MAKE_ARGS = else