From 4b106ac1c9099bfc43adfd883d46219ce6a6a706 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 13 Nov 2014 19:19:08 +0100 Subject: Add 'help_features' make target (prints WITH_*** options) --- GNUmakefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/GNUmakefile b/GNUmakefile index 50b7bca8b18..36077a58c6d 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 -- cgit v1.2.3