Skip to content
Snippets Groups Projects
Select Git revision
  • edf339623825e442cdad411cc5edb565e4a8b09f
  • master default protected
  • 1.31
  • 4.38.8
  • 4.38.7
  • 4.38.6
  • 4.38.5
  • 4.38.4
  • 4.38.3
  • 4.38.2
  • 4.38.1
  • 4.38.0
  • 4.37.2
  • 4.37.1
  • 4.37.0
  • 4.36.0
  • 4.35.0
  • 4.34.1
  • 4.34.0
  • 4.33.1
  • 4.33.0
  • 4.32.2
  • 4.32.1
23 results

target-add-licenses.mk

Blame
  • target-add-licenses.mk 1.21 KiB
    #############################################################################################
    #############################################################################################
    ##
    ## ADD SPDX LICENSES
    ##
    ## For commercial projects, it is not necessary to add the SPDX license identifier.
    ## The license header in each file is only for open-source projects, for example under 
    ## the AGPL 3.0 license.
    ##
    #############################################################################################
    #############################################################################################
    
    ifeq ($(ADDLICENSE_BIN),) 
      $(error "addlicense is not installed. Please check your makefile and include the licenses.mk")
    endif
    
    .PHONY: add-licenses
    ## Add license headers to all go files
    add-licenses:
    	$(ECHOMARKER) "Add license headers to all sourche files"
    ifeq ($(LICENSE_FILE_PATTERN),)
    	$(error "LICENSE_FILE_PATTERN is not set. Please check your makefile and include the licenses.mk")
    endif
    
    ifndef SPDX_LICENSE_ID 
    	$(error "SPDX_LICENSE_ID is not defined. Please check your makefile and include the licenses.mk")
    endif
    	$(QUIET) $(ADDLICENSE_BIN) -c "$(COPYRIGHT_OWNER)" -s -l "$(SPDX_LICENSE_ID)" $(LICENSE_FILE_PATTERN)