1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- LICENSE_EXPRESSION=
- LICENSE_NAMES=
- MODULE_LICENSES_RESTRICTIONS=
- MODULE_LICENSES_RESTRICTION_EXCEPTIONS=
- MODULE_LICENSES_RESTRICTION_TYPES=
- MODULEWISE_LICENSES_RESTRICTIONS=
- MODULEWISE_LICENSES_RESTRICTION_TYPES=
- DEFAULT_MODULE_LICENSE=Service-Default-License
- EXPLICIT_LICENSE_PREFIXES=
- EXPLICIT_LICENSE_EXCEPTIONS=
- LICENSES=
- LICENSES+=build/conf/licenses.json
- macro _DONT_REQUIRE_LICENSE() {
- SET(EXPLICIT_LICENSE_PREFIXES "")
- }
- ### @usage: LICENSE(licenses...)
- ###
- ### Specify the licenses of the module, separated by spaces. Specifying multiple licenses interpreted as permission to use this
- ### library satisfying all conditions of any of the listed licenses.
- ###
- ### A license must be prescribed for contribs
- macro LICENSE(Flags...) {
- SET(LICENSE_EXPRESSION $Flags)
- SET(LICENSE_NAMES $Flags)
- # TODO(YMAKE-1136) avoid abusing LICENSE
- # NOTICE: final value of MODVER might not be set yet if VERSION macro is called after LICENSE. Var expansion is
- # escaped here to prevent eager value substitution by SET but allow delayed value substitution when
- # adding linking SBOM data command to graph.
- when ($_NEED_SBOM_INFO == "yes") {
- _SBOM_INFO_LOCAL="path=${MODDIR};ver=${join=.:MODVER};lang=${MODULE_LANG}"
- }
- otherwise {
- _SBOM_INFO_LOCAL=
- }
- SET_APPEND(_SBOM_INFO_GLOBAL $_SBOM_INFO_LOCAL)
- }
- ### @usage LICENSE_RESTRICTION(ALLOW_ONLY|DENY LicenseProperty...)
- ###
- ### Restrict licenses of direct and indirect module dependencies.
- ###
- ### ALLOW_ONLY restriction type requires dependent module to have at least one license without properties not listed in restrictions list.
- ###
- ### DENY restriction type forbids dependency on module with no license without any listed property from the list.
- ###
- ### Note: Can be used multiple times on the same module all specified constraints will be checked.
- ### All macro invocation for the same module must use same constraints type (DENY or ALLOW_ONLY)
- macro LICENSE_RESTRICTION(TYPE, RESTRICTIONS...) {
- SET_APPEND(MODULE_LICENSES_RESTRICTION_TYPES $TYPE)
- SET_APPEND(MODULE_LICENSES_RESTRICTIONS $RESTRICTIONS)
- }
- ### @usage MODULEWISE_LICENSE_RESTRICTION(ALLOW_ONLY|DENY LicenseProperty...)
- ###
- ### Restrict licenses per module only, without it peers.
- ###
- ### ALLOW_ONLY restriction type requires module to have at least one license without properties not listed in restrictions list.
- ###
- ### DENY restriction type forbids module with no license without any listed property from the list.
- ###
- ### Note: Can be used multiple times on the same module all specified constraints will be checked.
- ### All macro invocation for the same module must use same constraints type (DENY or ALLOW_ONLY)
- macro MODULEWISE_LICENSE_RESTRICTION(TYPE, RESTRICTIONS...) {
- SET_APPEND(MODULEWISE_LICENSES_RESTRICTION_TYPES $TYPE)
- SET_APPEND(MODULEWISE_LICENSES_RESTRICTIONS $RESTRICTIONS)
- }
- ### @usage LICENSE_RESTRICTION_EXCEPTIONS(Module...)
- ###
- ### List of modules for exception from LICENSE_RESTRICTION and MODULEWISE_LICENSE_RESTRICTION logic.
- macro LICENSE_RESTRICTION_EXCEPTIONS(EXCEPT...) {
- SET_APPEND(MODULE_LICENSES_RESTRICTION_EXCEPTIONS $EXCEPT)
- }
|