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:
authorCampbell Barton <ideasman42@gmail.com>2019-04-16 16:42:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-16 16:43:42 +0300
commitd5a76451c016530dbb0aadcbb4053b8933066d50 (patch)
tree66d5eef234d49da349e3747c863597d60b347645 /GNUmakefile
parentfc32f98bbc2f094cddf1c75e092c98d7a00a22b9 (diff)
GNUmakefile: add 'make format'
Convenience access to clang_format_paths.py utility.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 35960733858..5a835baf10a 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -123,6 +123,11 @@ Utilities
* update:
updates git and all submodules
+ * format
+ Format source code using clang (uses PATHS if passed in). For example::
+
+ make format PATHS="source/blender/blenlib source/blender/blenkernel"
+
Environment Variables
* BUILD_CMAKE_ARGS: Arguments passed to CMake.
@@ -510,6 +515,10 @@ update: .FORCE
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master
+format: .FORCE
+ PATH="../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
+ python3 source/tools/utils/clang_format_paths.py --expand-tabs $(PATHS)
+
# -----------------------------------------------------------------------------
# Documentation