Skip to content
Snippets Groups Projects
Select Git revision
  • ce830d90afdd358547b547834daa85e9eec210f4
  • master default protected
  • v0.4.7
  • v0.4.6
  • v0.4.5
  • v0.4.4
  • v0.4.3
  • v0.4.2
  • v0.4.1
  • v0.4.0
  • v0.3.0
  • v0.2.1
  • v0.2.0
13 results

go.mk

Blame
  • go.mk 866 B
    #############################################################################################
    #############################################################################################
    ##
    ## COMMANDS GO
    ##
    #############################################################################################
    #############################################################################################
    
    # path and binaries
    GO               := go
    
    EXECUTABLES = $(EXECUTABLES:-) $(GO); 
    
    ifeq ($(shell command -v $(GO) 2> /dev/null),)
      $(error "go is not installed. Please install go <https://go.dev/doc/install>")
    endif
    
    GOPATH=$(shell go env GOPATH)
    
    ifeq ($(GOPATH),)
        DIRS := bin pkg src
        GOPATH=$(DEPLOYMENT_PATH)/go/
        $(shell mkdir -p $(GOPATH))
    	$(shell $(foreach entry,$(DIRS),mkdir -p "$(GOPATH)$(entry)";))
        export PATH=$(PATH):$(GOPATH)/bin
    endif