From 76c7365ed2aa735c244d519dfe70dfbea79db008 Mon Sep 17 00:00:00 2001 From: Gary Belvin Date: Tue, 2 Jun 2015 18:31:34 -0700 Subject: [PATCH] add python and java support --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8c2a2d0b..ccd1f2f9 100644 --- a/Makefile +++ b/Makefile @@ -27,13 +27,19 @@ else endif ifeq ($(LANGUAGE),go) -SUFFIX:= pb.go +SUFFIX:= .pb.go endif ifeq ($(LANGUAGE),cpp) -SUFFIX:= pb.cc +SUFFIX:= .pb.cc +endif +ifeq ($(LANGUAGE),py) +SUFFIX:= _pb2.py +endif +ifeq ($(LANGUAGE),java) +SUFFIX:= .java endif -DEPS:= $(shell find . -type f -name '*.proto' | sed "s/proto$$/$(SUFFIX)/") +DEPS:= $(shell find . -type f -name '*.proto' | sed "s/\.proto$$/$(SUFFIX)/") all: supported_lang $(DEPS) @@ -42,7 +48,7 @@ ifndef SUFFIX $(error unsupported language: [$(LANGUAGE)]) endif -%.$(SUFFIX): %.proto +%$(SUFFIX): %.proto mkdir -p $(OUTPUT) protoc $(FLAGS) $(dir $<)*.proto