[Bf-blender-cvs] [03885fe1208] master: Makefile: support 'make bpy lite' / 'make bpy release'
Campbell Barton
noreply at git.blender.org
Tue Sep 13 05:30:25 CEST 2022
Commit: 03885fe1208361330bc58de4beb5502e4fe22f5d
Author: Campbell Barton
Date: Tue Sep 13 13:24:49 2022 +1000
Branches: master
https://developer.blender.org/rB03885fe1208361330bc58de4beb5502e4fe22f5d
Makefile: support 'make bpy lite' / 'make bpy release'
Re-order configuration loading so 'bpy' is loaded after others.
Needed as `bpy` disables options other configurations enable.
===================================================================
M GNUmakefile
===================================================================
diff --git a/GNUmakefile b/GNUmakefile
index a218b1d226c..884d2232d71 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -230,9 +230,18 @@ endif
# -----------------------------------------------------------------------------
-# additional targets for the build configuration
+# Additional targets for the build configuration
-# support 'make debug'
+# NOTE: These targets can be combined and are applied in reverse order listed here.
+# So it's important that `bpy` comes before `release` (for example)
+# `make bpy release` first loads `release` configuration, then `bpy`.
+# This is important as `bpy` will turn off some settings enabled by release.
+
+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 debug, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_debug
BUILD_TYPE:=Debug
@@ -257,11 +266,6 @@ ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_headless
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake" $(CMAKE_CONFIG_ARGS)
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))" ""
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS)
More information about the Bf-blender-cvs
mailing list