[Bf-blender-cvs] [4b106ac] master: Add 'help_features' make target (prints WITH_*** options)

Campbell Barton noreply at git.blender.org
Thu Nov 13 19:43:31 CET 2014


Commit: 4b106ac1c9099bfc43adfd883d46219ce6a6a706
Author: Campbell Barton
Date:   Thu Nov 13 19:19:08 2014 +0100
Branches: master
https://developer.blender.org/rB4b106ac1c9099bfc43adfd883d46219ce6a6a706

Add 'help_features' make target (prints WITH_*** options)

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

M	GNUmakefile

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

diff --git a/GNUmakefile b/GNUmakefile
index 50b7bca..36077a5 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -206,6 +206,9 @@ help:
 	@echo "  * doc_dna  - generate blender file format reference"
 	@echo "  * doc_man  - generate manpage"
 	@echo ""
+	@echo "Information"
+	@echo "  * help          - this help message"
+	@echo "  * help_features - show a list of optional features when building"
 
 # -----------------------------------------------------------------------------
 # Packages
@@ -402,6 +405,16 @@ doc_dna:
 doc_man:
 	python3 doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
 
+help_features:
+	@python3 -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
+
 
 clean:
 	$(MAKE) -C "$(BUILD_DIR)" clean




More information about the Bf-blender-cvs mailing list