github.com/ethereum/go-ethereum@v1.14.3/Makefile (about)

     1  # This Makefile is meant to be used by people that do not usually work
     2  # with Go source code. If you know what GOPATH is then you probably
     3  # don't need to bother with make.
     4  
     5  .PHONY: geth all test lint clean devtools help
     6  
     7  GOBIN = ./build/bin
     8  GO ?= latest
     9  GORUN = go run
    10  
    11  #? geth: Build geth
    12  geth:
    13  	$(GORUN) build/ci.go install ./cmd/geth
    14  	@echo "Done building."
    15  	@echo "Run \"$(GOBIN)/geth\" to launch geth."
    16  
    17  #? all: Build all packages and executables
    18  all:
    19  	$(GORUN) build/ci.go install
    20  
    21  #? test: Run the tests
    22  test: all
    23  	$(GORUN) build/ci.go test
    24  
    25  #? lint: Run certain pre-selected linters
    26  lint: ## Run linters.
    27  	$(GORUN) build/ci.go lint
    28  
    29  #? clean: Clean go cache, built executables, and the auto generated folder
    30  clean:
    31  	go clean -cache
    32  	rm -fr build/_workspace/pkg/ $(GOBIN)/*
    33  
    34  # The devtools target installs tools required for 'go generate'.
    35  # You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
    36  
    37  #? devtools: Install recommended developer tools
    38  devtools:
    39  	env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
    40  	env GOBIN= go install github.com/fjl/gencodec@latest
    41  	env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
    42  	env GOBIN= go install ./cmd/abigen
    43  	@type "solc" 2> /dev/null || echo 'Please install solc'
    44  	@type "protoc" 2> /dev/null || echo 'Please install protoc'
    45  
    46  #? help: Get more info on make commands.
    47  help: Makefile
    48  	@echo " Choose a command run in go-ethereum:"
    49  	@sed -n 's/^#?//p' $< | column -t -s ':' |  sort | sed -e 's/^/ /'