Unverified 提交 f72ae261 作者: Steven Allen 提交者: GitHub

Merge pull request #6411 from ipfs/build/gogo-from-gomod

build: use protoc-gen-* from gomod
...@@ -15,6 +15,7 @@ gx-workspace-update.json ...@@ -15,6 +15,7 @@ gx-workspace-update.json
.ipfs .ipfs
bin/gx bin/gx
bin/protoc-*
bin/gx* bin/gx*
bin/tmp bin/tmp
bin/gocovmerge bin/gocovmerge
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
SHELL=PATH='$(PATH)' /bin/sh SHELL=PATH='$(PATH)' /bin/sh
PROTOC = protoc --gogofaster_out=. --proto_path=.:$(GOPATH)/src:$(dir $@) $<
# enable second expansion # enable second expansion
.SECONDEXPANSION: .SECONDEXPANSION:
......
...@@ -5,6 +5,7 @@ DISTCLEAN := ...@@ -5,6 +5,7 @@ DISTCLEAN :=
TEST := TEST :=
TEST_SHORT := TEST_SHORT :=
GOCC ?= go GOCC ?= go
PROTOC ?= protoc
all: help # all has to be first defined target all: help # all has to be first defined target
.PHONY: all .PHONY: all
...@@ -58,8 +59,8 @@ include $(dir)/Rules.mk ...@@ -58,8 +59,8 @@ include $(dir)/Rules.mk
# universal rules # # universal rules #
# -------------------- # # -------------------- #
%.pb.go: %.proto %.pb.go: %.proto bin/protoc-gen-gogofaster
$(PROTOC) $(PROTOC) --gogofaster_out=. --proto_path=.:$(GOPATH)/src:$(dir $@) $<
# -------------------- # # -------------------- #
# core targets # # core targets #
......
...@@ -2,8 +2,8 @@ include mk/header.mk ...@@ -2,8 +2,8 @@ include mk/header.mk
dist_root_$(d)="/ipfs/QmPrXH9jRVwvd7r5MC5e6nV4uauQGzLk1i2647Ye9Vbbwe" dist_root_$(d)="/ipfs/QmPrXH9jRVwvd7r5MC5e6nV4uauQGzLk1i2647Ye9Vbbwe"
TGTS_$(d) := $(d)/gx $(d)/gx-go TGTS_$(d) := $(d)/protoc
DISTCLEAN += $(wildcard $(d)/gx-v*) $(wildcard $(d)/gx-go-v*) $(d)/tmp DISTCLEAN += $(d)/protoc $(d)/tmp
PATH := $(realpath $(d)):$(PATH) PATH := $(realpath $(d)):$(PATH)
...@@ -15,5 +15,8 @@ else ...@@ -15,5 +15,8 @@ else
ln -s $(notdir $^) $@ ln -s $(notdir $^) $@
endif endif
bin/protoc-gen-gogofaster:
$(call go-build,github.com/gogo/protobuf/protoc-gen-gogofaster)
CLEAN += $(TGTS_$(d)) CLEAN += $(TGTS_$(d))
include mk/footer.mk include mk/footer.mk
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论