Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-09 05:17:09 +0300
committerCampbell Barton <campbell@blender.org>2022-09-09 05:17:09 +0300
commitce5ad663305a46a61e95ade1700b9b290c6847f6 (patch)
tree2ec29aeed0c35a097f9f311eb96f3a79661884f4 /GNUmakefile
parent3a01c23a84c0641f0f656c805ac29194a240728e (diff)
GNUmakefile: change message to reference "bpy" when building as a module
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile12
1 files changed, 10 insertions, 2 deletions
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