-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I used this Makefile for correctly work (sorry that I do not pull request):
PROTO_SRC := <path-to-proto-files>
PROTO_DST := ${PROTO_SRC}/build
PROTO_FILES := $(wildcard ${PROTO_SRC}/*.proto)
LUA_FILES := $(addprefix ${PROTO_DST}/,$(notdir $(PROTO_FILES:.proto=_pb.lua)))
all: ${PROTO_DST} ${LUA_FILES}
${PROTO_DST}:
mkdir -p ${PROTO_DST}
${PROTO_DST}/%_pb.lua: ${PROTO_SRC}/%.proto
protoc -I ${PROTO_SRC} $< --lua_out ${PROTO_DST}
# fixed require with bracket end line
sed "s/^\(local.*require.*\))$$/\1/" -i $@
# fixed message from extrenal file
grep '^local [^=]*_pb = require' $@ | \
awk '{print $$2}' | \
while read r; do sed -i "s/ = module.$${r}_/ = $${r}./i" $@; doneReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels