Fix "make deps" error when building deps with make and Blender with ninja
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 30 Aug 2019 15:47:57 +0000 (17:47 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 30 Aug 2019 15:57:18 +0000 (17:57 +0200)
GNUmakefile

index 4462a13207e705078518d71e147e6ccea691eccc..d17596d203d67b857c77f75078ad3ce45fad48c1 100644 (file)
@@ -233,12 +233,19 @@ endif
 ifneq "$(findstring ninja, $(MAKECMDGOALS))" ""
        BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -G Ninja
        BUILD_COMMAND:=ninja
+       DEPS_BUILD_COMMAND:=ninja
 else
        ifneq ("$(wildcard $(BUILD_DIR)/build.ninja)","")
                BUILD_COMMAND:=ninja
        else
                BUILD_COMMAND:=make -s
        endif
+
+       ifneq ("$(wildcard $(DEPS_BUILD_DIR)/build.ninja)","")
+               DEPS_BUILD_COMMAND:=ninja
+       else
+               DEPS_BUILD_COMMAND:=make -s
+       endif
 endif
 
 # -----------------------------------------------------------------------------
@@ -333,7 +340,7 @@ deps: .FORCE
 
        @echo
        @echo Building dependencies ...
-       $(BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
+       $(DEPS_BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
        @echo
        @echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
        @echo