From e9bbfbcd3843cb754e2302a7904268013793d2da Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Tue, 25 Nov 2014 14:47:04 -0800 Subject: [PATCH] Link Java Nano generator into protoc. --- src/Makefile.am | 21 +++++++++++++++++++++ src/google/protobuf/compiler/main.cc | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index 815c9ae960..b88e32ea6c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -239,6 +239,27 @@ libprotoc_la_SOURCES = \ google/protobuf/compiler/java/java_string_field.h \ google/protobuf/compiler/java/java_doc_comment.cc \ google/protobuf/compiler/java/java_doc_comment.h \ + google/protobuf/compiler/javanano/javanano_enum.cc \ + google/protobuf/compiler/javanano/javanano_enum_field.h \ + google/protobuf/compiler/javanano/javanano_extension.cc \ + google/protobuf/compiler/javanano/javanano_field.cc \ + google/protobuf/compiler/javanano/javanano_file.cc \ + google/protobuf/compiler/javanano/javanano_generator.cc \ + google/protobuf/compiler/javanano/javanano_helpers.cc \ + google/protobuf/compiler/javanano/javanano_message.cc \ + google/protobuf/compiler/javanano/javanano_message_field.h \ + google/protobuf/compiler/javanano/javanano_params.h \ + google/protobuf/compiler/javanano/javanano_primitive_field.h \ + google/protobuf/compiler/javanano/javanano_enum_field.cc \ + google/protobuf/compiler/javanano/javanano_enum.h \ + google/protobuf/compiler/javanano/javanano_extension.h \ + google/protobuf/compiler/javanano/javanano_field.h \ + google/protobuf/compiler/javanano/javanano_file.h \ + google/protobuf/compiler/javanano/javanano_generator.h \ + google/protobuf/compiler/javanano/javanano_helpers.h \ + google/protobuf/compiler/javanano/javanano_message_field.cc \ + google/protobuf/compiler/javanano/javanano_message.h \ + google/protobuf/compiler/javanano/javanano_primitive_field.cc \ google/protobuf/compiler/python/python_generator.cc bin_PROGRAMS = protoc diff --git a/src/google/protobuf/compiler/main.cc b/src/google/protobuf/compiler/main.cc index 2f5bdaf70e..9f2127bb9f 100644 --- a/src/google/protobuf/compiler/main.cc +++ b/src/google/protobuf/compiler/main.cc @@ -34,6 +34,7 @@ #include #include #include +#include int main(int argc, char* argv[]) { @@ -57,5 +58,10 @@ int main(int argc, char* argv[]) { cli.RegisterGenerator("--python_out", &py_generator, "Generate Python source file."); + // Java Nano + google::protobuf::compiler::javanano::JavaNanoGenerator javanano_generator; + cli.RegisterGenerator("--javanano_out", &javanano_generator, + "Generate Java Nano source file."); + return cli.Run(argc, argv); }