Run autopep8 as well as clang-format when calling "make format",
the PATHS argument is passed to both utilities which will only operate on files they support.
For example: make format PATHS=release/scripts formats Python scripts, make format PATHS=source/blender/blenlib would format C/C++.
If users really want they can format C/C++ & Python files at the same time since both formatting utilities filter on file extension.
make format PATHS="release/scripts/startup/nodeitems_builtins.py source/creator/creator.c"
A LIBDIR variable has been added to the GNUmakefile to simplify references to this directory which can be one of 3 possible values.
Notes:
- This is a follow up to D14686 which added defaults so autopep8 could run on all of the Python code in Blender's main repository.
- I wasn't able to use the Python binary in place (it gives an error that libcrypt.so.1 isn't found), and didn't think it necessary to use the pre-compiled Python. So PYTHON will always be used to execute autopep8.py found in our ../lib/ directory. Otherwise the autopep8 command will be used if none of the paths under ../lib/ are found.
- The checks for ../lib/* are awkward, we could consider setting a single lib path and reusing that.
To check formatting does something, temporarily delete ./pyproject.toml and run make format.