一、geth makefile 以及编译逻辑
上篇提到用 make geth 来编译geth客户端。我们来看看make file做了什么:
.PHONY: geth android ios evm all test clean
GOBIN = ./build/bin
GO ?= latest
GORUN = env GO111MODULE=on go run
geth:
$(GORUN) build/ci.go install ./cmd/geth
@echo "Done building."
@echo "Run \"$(GOBIN)/geth\" to launch geth."
all:
$(GORUN) build/ci.go install
执行了 ci.go
func main() {
log.SetFlags(log.Lshortfile)
if !common.FileExist(filepath.Join("build", "ci.go")) {
log.Fatal("this script must be run from the root of the repository")
}
if len(os.Args) < 2 {
log.Fatal("need subcommand as first argument")
}
switch os.Args[1] {
case "install":
doInstall(os.Args[2:])
}
里面做了两件事情
1,ln -s命令在build/_workspace/ 目录上生成了go-etherum的一个文件镜像,不占用磁盘空间,与源文件同步更新文章来源:https://www.toymoban.com/news/detail-779183.html
2文章来源地址https://www.toymoban.com/news/detail-779183.html
到了这里,关于【区块链 | 智能合约】Ethereum源代码(2)- go-ethereum 客户端入口代码和Node分析的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!