[Bf-blender-cvs] [102035373a4] master: Build: automatically detect ninja build system when running "make"

Brecht Van Lommel noreply at git.blender.org
Mon Aug 12 15:25:20 CEST 2019


Commit: 102035373a48fddfa54f785168898d90343cf45a
Author: Brecht Van Lommel
Date:   Mon Aug 12 15:20:31 2019 +0200
Branches: master
https://developer.blender.org/rB102035373a48fddfa54f785168898d90343cf45a

Build: automatically detect ninja build system when running "make"

So that you don't have to specify "make ninja" every time.

===================================================================

M	GNUmakefile

===================================================================

diff --git a/GNUmakefile b/GNUmakefile
index 1ad7cc4fc27..2cd2c1a7443 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -230,11 +230,15 @@ endif
 # -----------------------------------------------------------------------------
 # build tool
 
-ifneq "$(findstring ninja, $(MAKECMDGOALS))" ""
-	BUILD_COMMAND:=ninja
+ifeq "$(findstring ninja, $(MAKECMDGOALS))" ""
 	BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -G Ninja
+	BUILD_COMMAND:=ninja
 else
-	BUILD_COMMAND:=make -s
+	ifneq ("$(wildcard $(BUILD_DIR)/build.ninja)","")
+		BUILD_COMMAND:=ninja
+	else
+		BUILD_COMMAND:=make -s
+	endif
 endif
 
 # -----------------------------------------------------------------------------



More information about the Bf-blender-cvs mailing list