Skip to content
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

build: use protoc-gen-* from gomod #6411

Merged
merged 1 commit into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ gx-workspace-update.json

.ipfs
bin/gx
bin/protoc-*
bin/gx*
bin/tmp
bin/gocovmerge
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

SHELL=PATH='$(PATH)' /bin/sh

PROTOC = protoc --gogofaster_out=. --proto_path=.:$(GOPATH)/src:$(dir $@) $<

# enable second expansion
.SECONDEXPANSION:

Expand Down
5 changes: 3 additions & 2 deletions Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ DISTCLEAN :=
TEST :=
TEST_SHORT :=
GOCC ?= go
PROTOC ?= protoc

all: help # all has to be first defined target
.PHONY: all
Expand Down Expand Up @@ -58,8 +59,8 @@ include $(dir)/Rules.mk
# universal rules #
# -------------------- #

%.pb.go: %.proto
$(PROTOC)
%.pb.go: %.proto bin/protoc-gen-gogofaster
$(PROTOC) --gogofaster_out=. --proto_path=.:$(GOPATH)/src:$(dir $@) $<

# -------------------- #
# core targets #
Expand Down
7 changes: 5 additions & 2 deletions bin/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ include mk/header.mk

dist_root_$(d)="/ipfs/QmPrXH9jRVwvd7r5MC5e6nV4uauQGzLk1i2647Ye9Vbbwe"

TGTS_$(d) := $(d)/gx $(d)/gx-go
DISTCLEAN += $(wildcard $(d)/gx-v*) $(wildcard $(d)/gx-go-v*) $(d)/tmp
TGTS_$(d) := $(d)/protoc
DISTCLEAN += $(d)/protoc $(d)/tmp

PATH := $(realpath $(d)):$(PATH)

Expand All @@ -15,5 +15,8 @@ else
ln -s $(notdir $^) $@
endif

bin/protoc-gen-gogofaster:
$(call go-build,github.com/gogo/protobuf/protoc-gen-gogofaster)

CLEAN += $(TGTS_$(d))
include mk/footer.mk