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:
-rw-r--r--GNUmakefile9
-rw-r--r--doc/manpage/blender.1.py12
2 files changed, 18 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 52f36b218d8..17a9e87be22 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -147,6 +147,8 @@ help:
@echo ""
@echo "Documentation Targets"
@echo " * doc_py - generate sphinx python api docs"
+ @echo " * doc_dna - generate blender file format reference"
+ @echo " * doc_man - generate manpage"
@echo ""
# -----------------------------------------------------------------------------
@@ -235,6 +237,13 @@ doc_py:
cd doc/python_api ; sphinx-build -n -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
+doc_dna:
+ $(BUILD_DIR)/bin/blender --background --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
+ @echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
+
+doc_man:
+ python3 doc/manpage/blender.1.py $(BUILD_DIR)/bin/blender
+
clean:
$(MAKE) -C $(BUILD_DIR) clean
diff --git a/doc/manpage/blender.1.py b/doc/manpage/blender.1.py
index 40234300994..21df42a4082 100644
--- a/doc/manpage/blender.1.py
+++ b/doc/manpage/blender.1.py
@@ -22,6 +22,7 @@
import subprocess
import os
+import sys
import time
import datetime
@@ -43,10 +44,15 @@ def man_format(data):
return data
+# allow passing blender as argument
+if sys.argv[-1].endswith(os.sep + "blender"):
+ blender_bin = sys.argv[-1]
+else:
+ blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
-blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
-
-blender_help = subprocess.Popen([blender_bin, "--help"], stdout=subprocess.PIPE).communicate()[0].decode()
+cmd = [blender_bin, "--help"]
+print(" executing:", " ".join(cmd))
+blender_help = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0].decode()
blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode().strip()
blender_version = blender_version.split("Build")[0]