[Bf-blender-cvs] [ce5ad663305] master: GNUmakefile: change message to reference "bpy" when building as a module

Campbell Barton noreply at git.blender.org
Fri Sep 9 04:18:44 CEST 2022


Commit: ce5ad663305a46a61e95ade1700b9b290c6847f6
Author: Campbell Barton
Date:   Fri Sep 9 12:17:09 2022 +1000
Branches: master
https://developer.blender.org/rBce5ad663305a46a61e95ade1700b9b290c6847f6

GNUmakefile: change message to reference "bpy" when building as a module

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

M	GNUmakefile

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

diff --git a/GNUmakefile b/GNUmakefile
index a82d1bedace..a218b1d226c 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -162,6 +162,7 @@ CPU:=$(shell uname -m)
 # Source and Build DIR's
 BLENDER_DIR:=$(shell pwd -P)
 BUILD_TYPE:=Release
+BLENDER_IS_PYTHON_MODULE:=
 
 # CMake arguments, assigned to local variable to make it mutable.
 CMAKE_CONFIG_ARGS := $(BUILD_CMAKE_ARGS)
@@ -259,6 +260,7 @@ endif
 ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
 	BUILD_DIR:=$(BUILD_DIR)_bpy
 	CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake" $(CMAKE_CONFIG_ARGS)
+	BLENDER_IS_PYTHON_MODULE:=1
 endif
 
 ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
@@ -297,8 +299,10 @@ endif
 # use the default build path can still use utility helpers.
 ifeq ($(OS), Darwin)
 	BLENDER_BIN?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
+	BLENDER_BIN_DIR?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
 else
 	BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
+	BLENDER_BIN_DIR?="$(BUILD_DIR)/bin"
 endif
 
 
@@ -355,8 +359,12 @@ all: .FORCE
 	@echo Building Blender ...
 	$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install
 	@echo
-	@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
-	@echo Blender successfully built, run from: $(BLENDER_BIN)
+	@echo Edit build configuration with: \"$(BUILD_DIR)/CMakeCache.txt\" run make again to rebuild.
+	@if test "$(BLENDER_IS_PYTHON_MODULE)" == ""; then \
+		echo Blender successfully built, run from: $(BLENDER_BIN); \
+	else \
+		echo Blender successfully built as a Python module, \"bpy\" can be imported from: $(BLENDER_BIN_DIR); \
+	fi
 	@echo
 
 debug: all



More information about the Bf-blender-cvs mailing list