[Bf-blender-cvs] [7946f34d647] master: GNUmakefile: add check_licenses target

Campbell Barton noreply at git.blender.org
Fri Feb 11 04:23:18 CET 2022


Commit: 7946f34d647713b6ab4979ef9164a2fce3c103a0
Author: Campbell Barton
Date:   Fri Feb 11 12:45:10 2022 +1100
Branches: master
https://developer.blender.org/rB7946f34d647713b6ab4979ef9164a2fce3c103a0

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.

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

M	GNUmakefile

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

diff --git a/GNUmakefile b/GNUmakefile
index 957ea1702e6..67620e3ec48 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -71,6 +71,10 @@ Static Source Code Checking
    * check_sparse:          Run blenders source through sparse (C only).
    * check_smatch:          Run blenders source through smatch (C only).
    * check_descriptions:    Check for duplicate/invalid descriptions.
+   * check_licenses:        Check license headers follow the SPDX license specification,
+                            using one of the accepted licenses in 'doc/license/SPDX-license-identifiers.txt'
+                            Append with 'SHOW_HEADERS=1' to show all unique headers
+                            which can be useful for spotting license irregularities.
 
 Spell Checkers
    This runs the spell checker from the developer tools repositor.
@@ -494,6 +498,12 @@ check_descriptions: .FORCE
 	$(BLENDER_BIN) --background -noaudio --factory-startup --python \
 	    "$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
 
+check_licenses: .FORCE
+	PYTHONIOENCODING=utf_8 $(PYTHON) \
+	    "$(BLENDER_DIR)/source/tools/check_source/check_licenses.py" \
+	    "--show-headers=$(SHOW_HEADERS)"
+
+
 # -----------------------------------------------------------------------------
 # Utilities
 #



More information about the Bf-blender-cvs mailing list