Add templates

This commit is contained in:
Manfred Touron
2016-12-13 10:59:34 +01:00
parent ce8f7bd8a7
commit 71fb53ae02
10 changed files with 9 additions and 251 deletions

View File

@@ -7,8 +7,9 @@ TARGETS_TMPL := $(foreach source, $(SOURCES), $(source)_tmpl)
build: $(TARGETS_GO) $(TARGETS_TMPL)
$(TARGETS_GO): %_go:
protoc --gogo_out="$(dir $*)" "$*"
protoc --gogo_out=. "$*"
$(TARGETS_TMPL): %_tmpl:
@mkdir -p $(dir $*)gen
protoc -I. --gotemplate_out=template_dir=templates:output "$*"
protoc -I. --gotemplate_out=template_dir=templates:services "$*"
gofmt -w $(dir $*)gen