Skip to content

Commit 99e9c07

Browse files
Halimaoholimanfjl
authored
Makefile: add help target to display available targets (#28845)
Co-authored-by: Martin HS <[email protected]> Co-authored-by: Felix Lange <[email protected]>
1 parent 8fd43c8 commit 99e9c07

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,43 @@ GOBIN = ./build/bin
88
GO ?= latest
99
GORUN = go run
1010

11+
#? geth: Build geth
1112
geth:
1213
$(GORUN) build/ci.go install ./cmd/geth
1314
@echo "Done building."
1415
@echo "Run \"$(GOBIN)/geth\" to launch geth."
1516

17+
#? all: Build all packages and executables
1618
all:
1719
$(GORUN) build/ci.go install
1820

21+
#? test: Run the tests
1922
test: all
2023
$(GORUN) build/ci.go test
2124

25+
#? lint: Run certain pre-selected linters
2226
lint: ## Run linters.
2327
$(GORUN) build/ci.go lint
2428

29+
#? clean: Clean go cache, built executables, and the auto generated folder
2530
clean:
2631
go clean -cache
2732
rm -fr build/_workspace/pkg/ $(GOBIN)/*
2833

2934
# The devtools target installs tools required for 'go generate'.
3035
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
3136

37+
#? devtools: Install recommended developer tools
3238
devtools:
3339
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
3440
env GOBIN= go install github.com/fjl/gencodec@latest
3541
env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
3642
env GOBIN= go install ./cmd/abigen
3743
@type "solc" 2> /dev/null || echo 'Please install solc'
3844
@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/^/ /'
50+
.PHONY: help

0 commit comments

Comments
 (0)