-
Notifications
You must be signed in to change notification settings - Fork 21k
Makefile: add help target to display available targets #28845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
3790999
bc6234a
f56ec6f
4390b4e
9e32966
2a49746
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,32 +7,45 @@ | |
GOBIN = ./build/bin | ||
GO ?= latest | ||
GORUN = go run | ||
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git) | ||
|
||
#? geth: Build geth | ||
geth: | ||
$(GORUN) build/ci.go install ./cmd/geth | ||
@echo "Done building." | ||
@echo "Run \"$(GOBIN)/geth\" to launch geth." | ||
|
||
#? all: Build all packages and executables, include abidump, abigen, bootnode, clef, devp2p, ethkey, evm, geth, p2psim, rlpdump | ||
all: | ||
$(GORUN) build/ci.go install | ||
|
||
#? test: Run the tests | ||
test: all | ||
$(GORUN) build/ci.go test | ||
|
||
#? lint: Run certain pre-selected linters | ||
lint: ## Run linters. | ||
$(GORUN) build/ci.go lint | ||
|
||
#? clean: Clean go cache and built excutebles, and the auto generated folder | ||
Halimao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
clean: | ||
go clean -cache | ||
rm -fr build/_workspace/pkg/ $(GOBIN)/* | ||
|
||
# The devtools target installs tools required for 'go generate'. | ||
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'. | ||
|
||
#? devtools: Install pre-requirement developer tools | ||
Halimao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
devtools: | ||
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest | ||
env GOBIN= go install github.com/fjl/gencodec@latest | ||
env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest | ||
env GOBIN= go install ./cmd/abigen | ||
@type "solc" 2> /dev/null || echo 'Please install solc' | ||
@type "protoc" 2> /dev/null || echo 'Please install protoc' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if/why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The target is actually a bit outdated because we track go-based tools differently now. They no longer need to be installed because we use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
#? help: Get more info on make commands. | ||
help: Makefile | ||
@echo " Choose a command run in "$(PROJECT_NAME)":" | ||
@sed -n 's/^#?//p' $< | column -t -s ':' | sort | sed -e 's/^/ /' | ||
.PHONY: help |
Uh oh!
There was an error while loading. Please reload this page.