license.conf 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. LICENSE_EXPRESSION=
  2. LICENSE_NAMES=
  3. MODULE_LICENSES_RESTRICTIONS=
  4. MODULE_LICENSES_RESTRICTION_EXCEPTIONS=
  5. MODULE_LICENSES_RESTRICTION_TYPES=
  6. MODULEWISE_LICENSES_RESTRICTIONS=
  7. MODULEWISE_LICENSES_RESTRICTION_TYPES=
  8. DEFAULT_MODULE_LICENSE=Service-Default-License
  9. EXPLICIT_LICENSE_PREFIXES=
  10. EXPLICIT_LICENSE_EXCEPTIONS=
  11. LICENSES=
  12. LICENSES+=build/conf/licenses.json
  13. macro _DONT_REQUIRE_LICENSE() {
  14. SET(EXPLICIT_LICENSE_PREFIXES "")
  15. }
  16. ### @usage: LICENSE(licenses...)
  17. ###
  18. ### Specify the licenses of the module, separated by spaces. Specifying multiple licenses interpreted as permission to use this
  19. ### library satisfying all conditions of any of the listed licenses.
  20. ###
  21. ### A license must be prescribed for contribs
  22. macro LICENSE(Flags...) {
  23. SET(LICENSE_EXPRESSION $Flags)
  24. SET(LICENSE_NAMES $Flags)
  25. # TODO(YMAKE-1136) avoid abusing LICENSE
  26. _CONTRIB_MODULE_HOOKS()
  27. }
  28. ### @usage LICENSE_RESTRICTION(ALLOW_ONLY|DENY LicenseProperty...)
  29. ###
  30. ### Restrict licenses of direct and indirect module dependencies.
  31. ###
  32. ### ALLOW_ONLY restriction type requires dependent module to have at least one license without properties not listed in restrictions list.
  33. ###
  34. ### DENY restriction type forbids dependency on module with no license without any listed property from the list.
  35. ###
  36. ### Note: Can be used multiple times on the same module all specified constraints will be checked.
  37. ### All macro invocation for the same module must use same constraints type (DENY or ALLOW_ONLY)
  38. macro LICENSE_RESTRICTION(TYPE, RESTRICTIONS...) {
  39. SET_APPEND(MODULE_LICENSES_RESTRICTION_TYPES $TYPE)
  40. SET_APPEND(MODULE_LICENSES_RESTRICTIONS $RESTRICTIONS)
  41. }
  42. ### @usage MODULEWISE_LICENSE_RESTRICTION(ALLOW_ONLY|DENY LicenseProperty...)
  43. ###
  44. ### Restrict licenses per module only, without it peers.
  45. ###
  46. ### ALLOW_ONLY restriction type requires module to have at least one license without properties not listed in restrictions list.
  47. ###
  48. ### DENY restriction type forbids module with no license without any listed property from the list.
  49. ###
  50. ### Note: Can be used multiple times on the same module all specified constraints will be checked.
  51. ### All macro invocation for the same module must use same constraints type (DENY or ALLOW_ONLY)
  52. macro MODULEWISE_LICENSE_RESTRICTION(TYPE, RESTRICTIONS...) {
  53. SET_APPEND(MODULEWISE_LICENSES_RESTRICTION_TYPES $TYPE)
  54. SET_APPEND(MODULEWISE_LICENSES_RESTRICTIONS $RESTRICTIONS)
  55. }
  56. ### @usage LICENSE_RESTRICTION_EXCEPTIONS(Module...)
  57. ###
  58. ### List of modules for exception from LICENSE_RESTRICTION and MODULEWISE_LICENSE_RESTRICTION logic.
  59. macro LICENSE_RESTRICTION_EXCEPTIONS(EXCEPT...) {
  60. SET_APPEND(MODULE_LICENSES_RESTRICTION_EXCEPTIONS $EXCEPT)
  61. }