Skip to content
Snippets Groups Projects
Select Git revision
  • 56f174e768b25966a3bc1678f6ea659b6913b0b1
  • master default protected
  • 0.5.9
  • 0.5.8
  • 0.5.7
  • 0.5.6
  • 0.5.5
  • 0.5.4
  • 0.5.3
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.17
  • 0.4.16
  • 0.4.15
  • 0.4.14
  • 0.4.13
  • 0.4.12
  • 0.4.11
  • 0.4.10
  • 0.4.9
  • 0.4.8
22 results

licenses.mk

Blame
  • licenses.mk 1.04 KiB
    #############################################################################################
    #############################################################################################
    ##
    ## LICENSE
    ##
    #############################################################################################
    #############################################################################################
    
    ifeq ($(GO),)
      $(error $(ERRORMARKER) Go is not defined, check your Makefile if go.mk is included)
    endif
    
    ifneq "$(wildcard $(SOURCE_PATH) )" ""
      ## Files wich should be checked for license headers
      LICENSE_FILE_PATTERN ?= $(shell find $(SOURCE_PATH) -type f \( -iname \*.go -o -iname \*.php -o -iname \*.js -o -iname \*.mjs -o -iname \*.cjs \) )
    endif
    
    # https://spdx.github.io/spdx-spec/v2.3/SPDX-license-list/
    ADDLICENSE_BIN ?= addlicense
    ifeq ($(shell command -v $(ADDLICENSE_BIN) 2> /dev/null),)
      $(shell $(GO) install github.com/google/addlicense@latest)
      EXECUTABLES = $(EXECUTABLES:-) $(ADDLICENSE_BIN);
    endif
    
    EXECUTABLES = $(EXECUTABLES:-) $(ADDLICENSE_BIN)