Cleanup: manually remove header text not handled by automation
[blender.git] / GNUmakefile
index 049040f29dd92fc136fde9a235749bfee3223b6c..d31abe66f37334b6b73482d99b2c92b0897d3cd1 100644 (file)
@@ -89,6 +89,16 @@ ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
 endif
 
 
+# -----------------------------------------------------------------------------
+# Blender binary path
+
+ifeq ($(OS), Darwin)
+       BLENDER_BIN="$(BUILD_DIR)/bin/blender.app/Contents/MacOS/blender"
+else
+       BLENDER_BIN="$(BUILD_DIR)/bin/blender"
+endif
+
+
 # -----------------------------------------------------------------------------
 # Get the number of cores for threaded build
 ifndef NPROCS
@@ -140,7 +150,7 @@ all: .FORCE
        $(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install
        @echo
        @echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
-       @echo Blender successfully built, run from: "$(BUILD_DIR)/bin/blender"
+       @echo Blender successfully built, run from: $(BLENDER_BIN)
        @echo
 
 debug: all
@@ -411,7 +421,7 @@ check_spelling_osl: .FORCE
            "$(BLENDER_DIR)/intern/cycles/kernel/shaders"
 
 check_descriptions: .FORCE
-       "$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
+       $(BLENDER_BIN) --background -noaudio --factory-startup --python \
            "$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
 
 # -----------------------------------------------------------------------------
@@ -435,8 +445,9 @@ update: .FORCE
        fi
        git pull --rebase
        git submodule update --init --recursive
-       git submodule foreach git checkout master
-       git submodule foreach git pull --rebase origin master
+       # Use blender2.7 branch for submodules that have it.
+       git submodule foreach "git checkout blender2.7 || git checkout master"
+       git submodule foreach git pull --rebase origin
 
 
 # -----------------------------------------------------------------------------
@@ -445,7 +456,8 @@ update: .FORCE
 
 # Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
 doc_py: .FORCE
-       "$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
+       ASAN_OPTIONS=halt_on_error=0 \
+       $(BLENDER_BIN) --background -noaudio --factory-startup \
                --python doc/python_api/sphinx_doc_gen.py
        cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
        @echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
@@ -455,23 +467,15 @@ doc_doxy: .FORCE
        @echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
 
 doc_dna: .FORCE
-       "$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
+       $(BLENDER_BIN) --background -noaudio --factory-startup \
                --python doc/blender_file_format/BlendFileDnaExporter_25.py
        @echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
 
 doc_man: .FORCE
-       $(PYTHON) doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
+       $(PYTHON) doc/manpage/blender.1.py $(BLENDER_BIN) blender.1
 
 help_features: .FORCE
-       @$(PYTHON) -c \
-               "import re; \
-               print('\n'.join([ \
-               w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
-               if not l.lstrip().startswith('#') \
-               for w in (re.sub(\
-                   r'.*\boption\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\".*\")\s*.*', r'\g<1> - \g<2>', l).strip('() \n'),) \
-               if w.startswith('WITH_')]))" | uniq
-
+       @$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt"
 
 clean: .FORCE
        $(MAKE) -C "$(BUILD_DIR)" clean