Commit Graph

190 Commits

Author SHA1 Message Date
Campbell Barton 994a93bd22 Fix "make doc_man" not working, after recent changes
Since [0] man page generation calls PYTHON directly.

[0]: 5486c70aae
2023-11-29 16:02:33 +11:00
Brecht Van Lommel cf1b3eee99 Fix "make doc_man" not working, after changes in 61d99d45
Ref #115127
2023-11-22 20:01:41 +01:00
Campbell Barton 16e75a93f7 Makefile: remove redundant directory changing
This printing an error if the build directory didn't exist,
remove as it's not needed.
2023-09-29 16:44:31 +10:00
Campbell Barton 73057cfd22 check_spelling: include *.metal files 2023-09-07 20:44:33 +10:00
Campbell Barton 9af2291541 check_spelling: rename check_spelling_osl -> check_spelling_shaders
- 'make check_spelling_shaders' now checks MSL & GLSL spelling.
- Add '--match' argument to 'check_spelling.py' for more configurable
  checks without relying on picking directories that only contain the
  desired file-type.
- Ignore spelling for scripts/addons & scripts/addons_contrib.
2023-09-03 21:35:07 +10:00
Campbell Barton 0fb4c107db Makefile: remove "make authors"
Since adding authors involves checking if their contribution requested
exclusion from the AUTHORS list, this isn't an action that should be
run and committed without some manual checking.

Since the script works without arguments and isn't an action most
developers should be running & committing, having a convenience entry
isn't especially useful.
2023-08-18 09:26:02 +10:00
Campbell Barton 63fa5b92e7 Authors Script: add script to generate individual contributors
Add the script used generate individual contributors for AUTHORS,
add "make authors" utility that updates the AUTHORS file in-place.
2023-08-16 21:00:20 +10:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Campbell Barton b1daf6bfad Tools: add --jobs arguments to clang checker and code-clean tool
Setting jobs to one is useful for debugging, reducing the number
of threads can be useful for code_clean as a background task.
2023-07-21 00:13:13 +10:00
Campbell Barton 2c9aa2c8e5 code checker: add 'make check_struct_comments'
This utility uses Python's clang module to validate comments intended
to match the struct member names. `cmake_static_check_clang.py` has
been written to support adding other checkers in the future.
2023-07-18 14:34:59 +10:00
Campbell Barton 65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Campbell Barton b44dace9d8 Build: remove smatch, sparse & splint checking scripts
These checkers were all C-only making them increasingly less useful.
2023-04-21 23:32:55 +10:00
Sergey Sharybin 03806d0b67 Re-design of submodules used in blender.git
This commit implements described in the #104573.

The goal is to fix the confusion of the submodule hashes change, which are not
ideal for any of the supported git-module configuration (they are either always
visible causing confusion, or silently staged and committed, also causing
confusion).

This commit replaces submodules with a checkout of addons and addons_contrib,
covered by the .gitignore, and locale and developer tools are moved to the
main repository.

This also changes the paths:
- /release/scripts are moved to the /scripts
- /source/tools are moved to the /tools
- /release/datafiles/locale is moved to /locale

This is done to avoid conflicts when using bisect, and also allow buildbot to
automatically "recover" wgen building older or newer branches/patches.

Running `make update` will initialize the local checkout to the changed
repository configuration.

Another aspect of the change is that the make update will support Github style
of remote organization (origin remote pointing to thy fork, upstream remote
pointing to the upstream blender/blender.git).

Pull Request #104755
2023-02-21 16:39:58 +01:00
Campbell Barton 09498264f6 Deps: build one at a time, each using all available cores on Linux
Use a MAKE wrapper for 'make deps' on Linux that ensures dependencies
are built one at a time. This is preferable because building many
dependencies at once made troubleshooting impractical and had the
downside that large deps such as LLVM would bottleneck on a single core.

This may be used for macOS, so far it's only tested on Linux.
2023-02-14 16:37:04 +11:00
Campbell Barton 46c34ba1f6 GNUmakefile: include install directory in 'make deps' message
Avoids uncertainly, ensure deps are copied from the right place.
2023-02-14 13:26:30 +11:00
Campbell Barton fe5c3a0ab3 GNUmakefile: add convenience target 'check_wiki_file_structure'
This target ensures https://wiki.blender.org/wiki/Source/File_Structure
follows Blender's source tree.
2023-01-28 16:41:12 +11:00
Campbell Barton 2c22795dfd Build: upgrade pre-built libraries for Linux
Replace ../lib/linux_centos7_x86_64 with ../lib/linux_x86_64_glibc_228,
built with Rocky8 Linux, compatible with the VFX platform CY2023,
see: T99618.

- Update build-bot configuration.
- Remove unnecessary check for Blosc, this is part of OpenVDB lib now.
- Remove WITH_CXX11_ABI, always use new C++11 ABI now
- Replace centos7 by glibc_228 everywhere

Note that existing builds with cached paths pointing to
"../lib/linux_centos7_x86_64" will need to be updated.

Includes contributions by Brecht.
2022-12-16 10:42:40 +11:00
Campbell Barton 710b8b7929 GNUmakefile: fix error showing final message with the 'dash' shell
The bpy module check wasn't working with dash,
use posix compliant check for empty string.
2022-09-20 12:53:03 +10:00
Campbell Barton 03885fe120 Makefile: support 'make bpy lite' / 'make bpy release'
Re-order configuration loading so 'bpy' is loaded after others.
Needed as `bpy` disables options other configurations enable.
2022-09-13 13:28:22 +10:00
Campbell Barton ce5ad66330 GNUmakefile: change message to reference "bpy" when building as a module 2022-09-09 12:17:09 +10:00
Campbell Barton 4824cad580 GNUmakefile: include autopep8 in the "make format" target
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.

Reviewed By: sybren, brecht

Ref D14789
2022-05-03 18:32:00 +10:00
Brecht Van Lommel e1a1dc868b Cleanup: fix source comment typos
Contributed by luzpaz.

Differential Revision: https://developer.blender.org/D14307
2022-03-11 18:27:58 +01:00
Campbell Barton c6df7266c7 CMake: move cmake_consistency_check.py into source/tools/ repo
This isn't needed for building Blender so move this along side
other source checking scripts.
2022-02-23 12:31:46 +11:00
Campbell Barton e1c33698e6 GNUmakefile: prefer "check_" prefix instead of "test_"
- Reserve "test" for tests & testing frameworks.
- Add "check_mypy" to "make help" text.
- Output to the standard output instead of redirecting to log-files,
  leave redirecting output log-files to the user running the command.
2022-02-23 12:31:46 +11:00
Campbell Barton 9d8af55eb8 GNUmakefile: missed removing docs for test_deprecated when renaming 2022-02-23 00:05:34 +11:00
Campbell Barton 6bb4c0e498 GNUmakefile: rename test_depracted to check_deprecated
Also move this utility into the source/tools repo.
2022-02-23 00:00:32 +11:00
Campbell Barton 31be5ce8b9 GNUmakefile: update arguments for 'doc_man' target
Add '--verbose' argument to the script so the destination is printed.
Otherwise there is no hint to where the man page was written.
2022-02-14 16:20:16 +11:00
Campbell Barton 47b783bbe9 GNUmakefile: remove package targets that no longer exist 2022-02-14 16:12:14 +11:00
Campbell Barton 963ca15ba4 GNUmakefile: don't echo output for checking utilities & docs
When running checkers, showing commands to activate them adds noise.
2022-02-14 16:09:05 +11:00
Campbell Barton 0fd66b4f07 GNUmakefile: use PYTHON variable instead of python3
Also update the Python3 binary on macOS.
2022-02-14 16:04:31 +11:00
Campbell Barton 7946f34d64 GNUmakefile: add check_licenses target
This reports files that don't include SPDX headers.
Optionally showing unique headers which is useful to see
irregular/nonstandard headers.
2022-02-11 14:22:27 +11:00
Campbell Barton c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
Campbell Barton 58761eb11a GNUmakefile: move editor settings to .editorconfig
Remove inline vim/emacs editor configuration,
add makefile to editorconfig instead.
2022-02-10 09:20:34 +11:00
Brecht Van Lommel 7d5ef64bfb Cleanup: fix typos in comments and docs
Contributed by luzpaz.

Differential Revision: https://developer.blender.org/D13264
2021-11-19 12:46:49 +01:00
Campbell Barton bca2701236 GNUmakefile: clarify that order isn't important for multiple targets
Also include example.
2021-10-20 10:04:14 +11:00
Campbell Barton 604ae5f7b6 Cleanup: tab indentation for CMake / GNUmakefile 2021-08-05 12:03:41 +10:00
Campbell Barton 7389fd9a35 Icons: resolve various issues for generating icons
- INKSCAPE_BIN environment variable was ignored by
  alert_icons_update & prvicons_update.
- `make icons` wasn't regenerating alert icons.
- Updating SVG icons failed using blender built with ASAN.
2021-08-04 11:35:05 +10:00
Campbell Barton e45a57656c GNUmakefile: add 'check_mypy' convenience target 2021-04-14 11:36:46 +10:00
Sybren A. Stüvel b8479a70c9 Add `make source_archive_complete` target
Add a `source_archive_complete` target for `make` that creates a source
archive including the source packages of Blender's dependencies.

This expands `make_source_archive.py` to include files from
`${BUILD_DIR}/source_archive/packages/` as well.

Reviewed By: dfelinto

Maniphest Tasks: T86124

Differential Revision: https://developer.blender.org/D10727
2021-04-13 17:47:48 +02:00
Ray Molenkamp f02e1a77c9 Makefile: add update_code target
Convenience target for updating the code, skipping SVN.

The Python script supports it, but this wasn't exposed in the makefile.

Ref D10457
2021-03-31 22:34:11 +11:00
Sybren A. Stüvel 8771f015f5 Python version of `make_source_archive.sh`
This is a Python version of the existing `make_source_archive.sh`
script. IMO it's easier to read, and it'll also be easier to extend with
the necessary functionality for D10598.

The number of lines of code is larger than `make_source_archive.sh`, but
it has considerably less invocations of `awk` ;-) And also the filtering
is integrated, instead of forking out to Python to prevent certain files
to be included in the tarball.

Reviewed By: dfelinto, campbellbarton

Differential Revision: https://developer.blender.org/D10629
2021-03-08 18:10:26 +01:00
Campbell Barton 6a12c50703 Docs: add notes to 'make deps' & the sqlite build configuration
- Move non-blender build targets into their own section.
- Expand 'make help' text, noting a local 'make deps' overrides.
- Note where the spell checkers word-list is maintained.
- Note on why sqlite is built without 'tcl'.
2021-02-12 16:33:59 +11:00
Brecht Van Lommel 886486615b macOS: use precompiled libraries for arm64 build
Standard wiki build instructions for building Blender on macOS can now be used
on Macs with ARM processors.

This contains all libraries except for Embree and OpenImageDenoise, so Cycles
performance does not yet have full performance and features in this build. An
x86-64 build is likely to still render faster than arm64 until Embree is added.

Uses the new lib/darwin_arm64 folder. For simplicity and to keep download size
under control, both for end users and builders, we are not planning to ship
universal binaries. So this is a separate folder from lib/darwin.

Ref T78710

Differential Revision: https://developer.blender.org/D10276
2021-02-02 12:08:23 +01:00
Ankit Meel 27e2c5ab78 Tests, docs: Use sanitizer options from environment too.
Don't overwrite environment variables that may
contain options like suppression files, symboliser etc.
It's similar to rBa181b156399a13fa429159112e30c8005d5e8a59
and rBA589d13408a60cbec34a8bc3cc798c586043743ae .
For Blender Add-ons repo, see the equivalent in D9816.

Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D9815
2021-01-29 14:13:26 +05:30
Matt Hill fdb7623e09 Unix/macOS: support building with Ccache
This adds an option (WITH_COMPILER_CCACHE) to build using Ccache if it's
found. Makefiles-based, Ninja-based and Xcode generators are supported.

Pass `-DWITH_COMPILER_CCACHE=ON` to cmake to enable Ccache.
Utility option in GNUmakefile is also added: for e.g.,
`make ninja ccache`.

Reviewed By: brecht, ankitm
Differential Revision: https://developer.blender.org/D9665
2020-12-21 10:47:35 +05:30
Alistair Sealy f52f51aef2 Cleanup: spelling in comments
Fixed a couple of typos in comments in CMakeLists.txt and GNUmakefile

Reviewed By: #platforms_builds_tests, mont29

Differential Revision: https://developer.blender.org/D9261
2020-10-19 09:27:32 +02:00
Aaron Carlisle 2f1a0f6f0e PyDoc: Multithread sphinx-build
Compile times went from over 5min to under 2 on my laptop.
2020-10-07 10:25:46 -04:00
Aaron Carlisle e748abda92 PyDoc: Remove workaround for slow sphinx builds
Tesing with newer versions of sphinx to directory `sphinx-build` is 
executed has no affect on the build time. Testing even gave a 2-3% speed 
boost.
2020-10-07 10:25:46 -04:00
Campbell Barton 9978485e82 Makefile: update spell checking targets
Update check_spelling targets to match changes to the utility,
take an optional CHECK_SPELLING_CACHE argument.
2020-09-06 02:19:58 +10:00
Brecht Van Lommel e707ed43ef Build: show helpful error when accidentally using GNUMakefile on Windows 2020-06-26 11:55:34 +02:00