From d95535b8fb3532b8f88bfd1d3b47d4ca6b15d1ce Mon Sep 17 00:00:00 2001 From: dsavvinov Date: Thu, 18 Aug 2016 12:37:29 +0300 Subject: [PATCH] Protobuf: improved build system of proto-compiler (especially dependencies and test launch) --- proto/compiler/Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/proto/compiler/Makefile b/proto/compiler/Makefile index ab6a1e89381..0dddd319065 100644 --- a/proto/compiler/Makefile +++ b/proto/compiler/Makefile @@ -19,17 +19,18 @@ RUNTIME_JAR = $(RUNTIME_DIR)/build/libs/protokot-runtime.jar # Testing project TEST_PROJECT = $(PROTOC_DIR)/protoc-tests -TRANSLATOR_TEST_DIR = ../../translator +TRANSLATOR_DIR = ../../translator +TRANSLATOR_TEST_DIR = $(TRANSLATOR_DIR) # Produce protoc*, .jar-packed runtime and symlink to runtime sources all: $(EXE) $(JAR) $(SYMLINK) # Place protoc* into build directory -$(EXE): $(BUILDDIR) $(PROTOC_EXE) +$(EXE): $(BUILDDIR) protoc cp $(PROTOC_EXE) $(EXE) # Build Protobuf Compiler via delegating call to another Makefile -$(PROTOC_EXE): +protoc: $(MAKE) -C $(PROTOC_DIR) # Place ProtoKot Runtime JAR into build directory @@ -51,8 +52,15 @@ $(BUILDDIR): mkdir -p $(BUILDDIR) # Testing -test: +test: all + # Compile .proto-files for Java and JS tests + cd $(PROTOC_DIR); make generate + # Run Java and JS test cd $(TEST_PROJECT); ./run_tests.sh + + # Rebuild translator JAR + cd $(TRANSLATOR_DIR); gradle jar + # Run Native tests cd $(TRANSLATOR_TEST_DIR); ./run_tests.sh -t --proto clean: $(MAKE) -C $(PROTOC_DIR) clean