1## Process this file with automake to produce Makefile.in 2 3conformance_protoc_inputs = \ 4 conformance.proto \ 5 $(top_srcdir)/src/google/protobuf/test_messages_proto3.proto 6 7# proto2 input files, should be separated with proto3, as we 8# can't generate proto2 files for ruby, php and objc 9conformance_proto2_protoc_inputs = \ 10 $(top_srcdir)/src/google/protobuf/test_messages_proto2.proto 11 12well_known_type_protoc_inputs = \ 13 $(top_srcdir)/src/google/protobuf/any.proto \ 14 $(top_srcdir)/src/google/protobuf/duration.proto \ 15 $(top_srcdir)/src/google/protobuf/field_mask.proto \ 16 $(top_srcdir)/src/google/protobuf/struct.proto \ 17 $(top_srcdir)/src/google/protobuf/timestamp.proto \ 18 $(top_srcdir)/src/google/protobuf/wrappers.proto 19 20 21protoc_outputs = \ 22 conformance.pb.cc \ 23 conformance.pb.h 24 25other_language_protoc_outputs = \ 26 conformance_pb2.py \ 27 Conformance.pbobjc.h \ 28 Conformance.pbobjc.m \ 29 conformance_pb.js \ 30 conformance_pb.rb \ 31 com/google/protobuf/Any.java \ 32 com/google/protobuf/AnyOrBuilder.java \ 33 com/google/protobuf/AnyProto.java \ 34 com/google/protobuf/BoolValue.java \ 35 com/google/protobuf/BoolValueOrBuilder.java \ 36 com/google/protobuf/BytesValue.java \ 37 com/google/protobuf/BytesValueOrBuilder.java \ 38 com/google/protobuf/conformance/Conformance.java \ 39 com/google/protobuf/DoubleValue.java \ 40 com/google/protobuf/DoubleValueOrBuilder.java \ 41 com/google/protobuf/Duration.java \ 42 com/google/protobuf/DurationOrBuilder.java \ 43 com/google/protobuf/DurationProto.java \ 44 com/google/protobuf/FieldMask.java \ 45 com/google/protobuf/FieldMaskOrBuilder.java \ 46 com/google/protobuf/FieldMaskProto.java \ 47 com/google/protobuf/FloatValue.java \ 48 com/google/protobuf/FloatValueOrBuilder.java \ 49 com/google/protobuf/Int32Value.java \ 50 com/google/protobuf/Int32ValueOrBuilder.java \ 51 com/google/protobuf/Int64Value.java \ 52 com/google/protobuf/Int64ValueOrBuilder.java \ 53 com/google/protobuf/ListValue.java \ 54 com/google/protobuf/ListValueOrBuilder.java \ 55 com/google/protobuf/NullValue.java \ 56 com/google/protobuf/StringValue.java \ 57 com/google/protobuf/StringValueOrBuilder.java \ 58 com/google/protobuf/Struct.java \ 59 com/google/protobuf/StructOrBuilder.java \ 60 com/google/protobuf/StructProto.java \ 61 com/google/protobuf/Timestamp.java \ 62 com/google/protobuf/TimestampOrBuilder.java \ 63 com/google/protobuf/TimestampProto.java \ 64 com/google/protobuf/UInt32Value.java \ 65 com/google/protobuf/UInt32ValueOrBuilder.java \ 66 com/google/protobuf/UInt64Value.java \ 67 com/google/protobuf/UInt64ValueOrBuilder.java \ 68 com/google/protobuf/Value.java \ 69 com/google/protobuf/ValueOrBuilder.java \ 70 com/google/protobuf/WrappersProto.java \ 71 com/google/protobuf_test_messages/proto3/TestMessagesProto3.java \ 72 com/google/protobuf_test_messages/proto2/TestMessagesProto2.java \ 73 google/protobuf/any.pb.cc \ 74 google/protobuf/any.pb.h \ 75 google/protobuf/any.rb \ 76 google/protobuf/any_pb2.py \ 77 google/protobuf/duration.pb.cc \ 78 google/protobuf/duration.pb.h \ 79 google/protobuf/duration.rb \ 80 google/protobuf/duration_pb2.py \ 81 google/protobuf/field_mask.pb.cc \ 82 google/protobuf/field_mask.pb.h \ 83 google/protobuf/field_mask.rb \ 84 google/protobuf/field_mask_pb2.py \ 85 google/protobuf/struct.pb.cc \ 86 google/protobuf/struct.pb.h \ 87 google/protobuf/struct.rb \ 88 google/protobuf/struct_pb2.py \ 89 google/protobuf/TestMessagesProto2.pbobjc.h \ 90 google/protobuf/TestMessagesProto2.pbobjc.m \ 91 google/protobuf/TestMessagesProto3.pbobjc.h \ 92 google/protobuf/TestMessagesProto3.pbobjc.m \ 93 google/protobuf/test_messages_proto3.pb.cc \ 94 google/protobuf/test_messages_proto3.pb.h \ 95 google/protobuf/test_messages_proto2.pb.cc \ 96 google/protobuf/test_messages_proto2.pb.h \ 97 google/protobuf/test_messages_proto3_pb.rb \ 98 google/protobuf/test_messages_proto3_pb2.py \ 99 google/protobuf/test_messages_proto2_pb2.py \ 100 google/protobuf/timestamp.pb.cc \ 101 google/protobuf/timestamp.pb.h \ 102 google/protobuf/timestamp.rb \ 103 google/protobuf/timestamp_pb2.py \ 104 google/protobuf/wrappers.pb.cc \ 105 google/protobuf/wrappers.pb.h \ 106 google/protobuf/wrappers.rb \ 107 google/protobuf/wrappers_pb2.py \ 108 Conformance/ConformanceRequest.php \ 109 Conformance/ConformanceResponse.php \ 110 Conformance/FailureSet.php \ 111 Conformance/WireFormat.php \ 112 GPBMetadata/Conformance.php \ 113 GPBMetadata/Google/Protobuf/Any.php \ 114 GPBMetadata/Google/Protobuf/Duration.php \ 115 GPBMetadata/Google/Protobuf/FieldMask.php \ 116 GPBMetadata/Google/Protobuf/Struct.php \ 117 GPBMetadata/Google/Protobuf/TestMessagesProto3.php \ 118 GPBMetadata/Google/Protobuf/Timestamp.php \ 119 GPBMetadata/Google/Protobuf/Wrappers.php \ 120 Google/Protobuf/Any.php \ 121 Google/Protobuf/BoolValue.php \ 122 Google/Protobuf/BytesValue.php \ 123 Google/Protobuf/DoubleValue.php \ 124 Google/Protobuf/Duration.php \ 125 Google/Protobuf/FieldMask.php \ 126 Google/Protobuf/FloatValue.php \ 127 Google/Protobuf/Int32Value.php \ 128 Google/Protobuf/Int64Value.php \ 129 Google/Protobuf/ListValue.php \ 130 Google/Protobuf/NullValue.php \ 131 Google/Protobuf/StringValue.php \ 132 Google/Protobuf/Struct.php \ 133 Google/Protobuf/Timestamp.php \ 134 Google/Protobuf/UInt32Value.php \ 135 Google/Protobuf/UInt64Value.php \ 136 Google/Protobuf/Value.php \ 137 Protobuf_test_messages/Proto3/ForeignEnum.php \ 138 Protobuf_test_messages/Proto3/ForeignMessage.php \ 139 Protobuf_test_messages/Proto3/TestAllTypes_NestedEnum.php \ 140 Protobuf_test_messages/Proto3/TestAllTypes_NestedMessage.php \ 141 Protobuf_test_messages/Proto3/TestAllTypes.php 142 # lite/com/google/protobuf/Any.java \ 143 # lite/com/google/protobuf/AnyOrBuilder.java \ 144 # lite/com/google/protobuf/AnyProto.java \ 145 # lite/com/google/protobuf/BoolValue.java \ 146 # lite/com/google/protobuf/BoolValueOrBuilder.java \ 147 # lite/com/google/protobuf/BytesValue.java \ 148 # lite/com/google/protobuf/BytesValueOrBuilder.java \ 149 # lite/com/google/protobuf/conformance/Conformance.java \ 150 # lite/com/google/protobuf/DoubleValue.java \ 151 # lite/com/google/protobuf/DoubleValueOrBuilder.java \ 152 # lite/com/google/protobuf/Duration.java \ 153 # lite/com/google/protobuf/DurationOrBuilder.java \ 154 # lite/com/google/protobuf/DurationProto.java \ 155 # lite/com/google/protobuf/FieldMask.java \ 156 # lite/com/google/protobuf/FieldMaskOrBuilder.java \ 157 # lite/com/google/protobuf/FieldMaskProto.java \ 158 # lite/com/google/protobuf/FloatValue.java \ 159 # lite/com/google/protobuf/FloatValueOrBuilder.java \ 160 # lite/com/google/protobuf/Int32Value.java \ 161 # lite/com/google/protobuf/Int32ValueOrBuilder.java \ 162 # lite/com/google/protobuf/Int64Value.java \ 163 # lite/com/google/protobuf/Int64ValueOrBuilder.java \ 164 # lite/com/google/protobuf/ListValue.java \ 165 # lite/com/google/protobuf/ListValueOrBuilder.java \ 166 # lite/com/google/protobuf/NullValue.java \ 167 # lite/com/google/protobuf/StringValue.java \ 168 # lite/com/google/protobuf/StringValueOrBuilder.java \ 169 # lite/com/google/protobuf/Struct.java \ 170 # lite/com/google/protobuf/StructOrBuilder.java \ 171 # lite/com/google/protobuf/StructProto.java \ 172 # lite/com/google/protobuf/Timestamp.java \ 173 # lite/com/google/protobuf/TimestampOrBuilder.java \ 174 # lite/com/google/protobuf/TimestampProto.java \ 175 # lite/com/google/protobuf/UInt32Value.java \ 176 # lite/com/google/protobuf/UInt32ValueOrBuilder.java \ 177 # lite/com/google/protobuf/UInt64Value.java \ 178 # lite/com/google/protobuf/UInt64ValueOrBuilder.java \ 179 # lite/com/google/protobuf/Value.java \ 180 # lite/com/google/protobuf/ValueOrBuilder.java \ 181 # lite/com/google/protobuf/WrappersProto.java 182 183bin_PROGRAMS = conformance-test-runner conformance-cpp 184 185# All source files excepet C++/Objective-C ones should be explicitly listed 186# here because the autoconf tools don't include files of other languages 187# automatically. 188EXTRA_DIST = \ 189 ConformanceJava.java \ 190 ConformanceJavaLite.java \ 191 README.md \ 192 conformance.proto \ 193 conformance_python.py \ 194 conformance_ruby.rb \ 195 conformance_php.php \ 196 failure_list_cpp.txt \ 197 failure_list_csharp.txt \ 198 failure_list_java.txt \ 199 failure_list_js.txt \ 200 failure_list_objc.txt \ 201 failure_list_python.txt \ 202 failure_list_python_cpp.txt \ 203 failure_list_python-post26.txt \ 204 failure_list_ruby.txt \ 205 failure_list_php.txt \ 206 failure_list_php_c.txt 207 208conformance_test_runner_LDADD = $(top_srcdir)/src/libprotobuf.la 209conformance_test_runner_SOURCES = conformance_test.h conformance_test.cc \ 210 conformance_test_main.cc \ 211 binary_json_conformance_suite.h \ 212 binary_json_conformance_suite.cc \ 213 text_format_conformance_suite.h \ 214 text_format_conformance_suite.cc \ 215 conformance_test_runner.cc \ 216 third_party/jsoncpp/json.h \ 217 third_party/jsoncpp/jsoncpp.cpp 218nodist_conformance_test_runner_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc google/protobuf/test_messages_proto2.pb.cc 219conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir) 220conformance_test_runner_CXXFLAGS = -std=c++11 221# Explicit deps beacuse BUILT_SOURCES are only done before a "make all/check" 222# so a direct "make test_cpp" could fail if parallel enough. 223conformance_test_runner-conformance_test.$(OBJEXT): conformance.pb.h 224conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h 225 226conformance_cpp_LDADD = $(top_srcdir)/src/libprotobuf.la 227conformance_cpp_SOURCES = conformance_cpp.cc 228nodist_conformance_cpp_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc google/protobuf/test_messages_proto2.pb.cc 229conformance_cpp_CPPFLAGS = -I$(top_srcdir)/src 230# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" 231# so a direct "make test_cpp" could fail if parallel enough. 232conformance_cpp-conformance_cpp.$(OBJEXT): conformance.pb.h 233 234if OBJC_CONFORMANCE_TEST 235 236bin_PROGRAMS += conformance-objc 237 238conformance_objc_SOURCES = conformance_objc.m ../objectivec/GPBProtocolBuffers.m 239nodist_conformance_objc_SOURCES = Conformance.pbobjc.m google/protobuf/TestMessagesProto2.pbobjc.m google/protobuf/TestMessagesProto3.pbobjc.m 240# On travis, the build fails without the isysroot because whatever system 241# headers are being found don't include generics support for 242# NSArray/NSDictionary, the only guess is their image at one time had an odd 243# setup for Xcode and old frameworks are being found. 244conformance_objc_CPPFLAGS = -I$(top_srcdir)/objectivec -isysroot `xcrun --sdk macosx --show-sdk-path` 245conformance_objc_LDFLAGS = -framework Foundation 246# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" 247# so a direct "make test_objc" could fail if parallel enough. 248conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h google/protobuf/TestMessagesProto2.pbobjc.h google/protobuf/TestMessagesProto3.pbobjc.h 249 250endif 251 252# JavaScript well-known types are expected to be in a directory called 253# google-protobuf, because they are usually in the google-protobuf npm 254# package. But we want to use the sources from our tree, so we recreate 255# that directory structure here. 256google-protobuf: 257 mkdir google-protobuf 258 259if USE_EXTERNAL_PROTOC 260 261# Some implementations include pre-generated versions of well-known types. 262protoc_middleman: $(conformance_protoc_inputs) $(conformance_proto2_protoc_inputs) $(well_known_type_protoc_inputs) google-protobuf 263 $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --ruby_out=. --objc_out=. --python_out=. --php_out=. --js_out=import_style=commonjs,binary:. $(conformance_protoc_inputs) 264 $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --objc_out=. --python_out=. --js_out=import_style=commonjs,binary:. $(conformance_proto2_protoc_inputs) 265 $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --ruby_out=. --python_out=. --js_out=import_style=commonjs,binary:google-protobuf $(well_known_type_protoc_inputs) 266 ## $(PROTOC) -I$(srcdir) -I$(top_srcdir) --java_out=lite:lite $(conformance_protoc_inputs) $(well_known_type_protoc_inputs) 267 touch protoc_middleman 268 269else 270 271# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is 272# relative to srcdir, which may not be the same as the current directory when 273# building out-of-tree. 274protoc_middleman: $(top_srcdir)/src/protoc$(EXEEXT) $(conformance_protoc_inputs) $(conformance_proto2_protoc_inputs) $(well_known_type_protoc_inputs) google-protobuf 275 oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --cpp_out=$$oldpwd --java_out=$$oldpwd --ruby_out=$$oldpwd --objc_out=$$oldpwd --python_out=$$oldpwd --php_out=$$oldpwd --js_out=import_style=commonjs,binary:$$oldpwd $(conformance_protoc_inputs) ) 276 oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --cpp_out=$$oldpwd --java_out=$$oldpwd --objc_out=. --python_out=$$oldpwd --js_out=import_style=commonjs,binary:$$oldpwd $(conformance_proto2_protoc_inputs) ) 277 oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --cpp_out=$$oldpwd --java_out=$$oldpwd --ruby_out=$$oldpwd --python_out=$$oldpwd --js_out=import_style=commonjs,binary:$$oldpwd/google-protobuf $(well_known_type_protoc_inputs) ) 278 ## @mkdir -p lite 279 ## oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --java_out=lite:$$oldpwd/lite $(conformance_protoc_inputs) $(well_known_type_protoc_inputs) ) 280 touch protoc_middleman 281 282endif 283 284$(protoc_outputs): protoc_middleman 285 286$(other_language_protoc_outputs): protoc_middleman 287 288CLEANFILES = $(protoc_outputs) protoc_middleman javac_middleman conformance-java javac_middleman_lite conformance-java-lite conformance-csharp conformance-php conformance-php-c $(other_language_protoc_outputs) 289 290MAINTAINERCLEANFILES = \ 291 Makefile.in 292 293javac_middleman: ConformanceJava.java protoc_middleman $(other_language_protoc_outputs) 294 jar=`ls ../java/util/target/*jar-with-dependencies.jar` && javac -classpath ../java/target/classes:$$jar ConformanceJava.java com/google/protobuf/conformance/Conformance.java com/google/protobuf_test_messages/proto3/TestMessagesProto3.java com/google/protobuf_test_messages/proto2/TestMessagesProto2.java 295 @touch javac_middleman 296 297conformance-java: javac_middleman 298 @echo "Writing shortcut script conformance-java..." 299 @echo '#! /bin/sh' > conformance-java 300 @jar=`ls ../java/util/target/*jar-with-dependencies.jar` && echo java -classpath .:../java/target/classes:$$jar ConformanceJava '$$@' >> conformance-java 301 @chmod +x conformance-java 302 303javac_middleman_lite: ConformanceJavaLite.java protoc_middleman $(other_language_protoc_outputs) 304 javac -classpath ../java/lite/target/classes:lite ConformanceJavaLite.java lite/com/google/protobuf/conformance/Conformance.java 305 @touch javac_middleman_lite 306 307conformance-java-lite: javac_middleman_lite 308 @echo "Writing shortcut script conformance-java-lite..." 309 @echo '#! /bin/sh' > conformance-java-lite 310 @echo java -classpath .:../java/lite/target/classes:lite ConformanceJavaLite '$$@' >> conformance-java-lite 311 @chmod +x conformance-java-lite 312 313# Currently the conformance code is alongside the rest of the C# 314# source, as it's easier to maintain there. We assume we've already 315# built that, so we just need a script to run it. 316conformance-csharp: $(other_language_protoc_outputs) 317 @echo "Writing shortcut script conformance-csharp..." 318 @echo '#! /bin/sh' > conformance-csharp 319 @echo 'dotnet ../csharp/src/Google.Protobuf.Conformance/bin/Release/netcoreapp2.1/Google.Protobuf.Conformance.dll "$$@"' >> conformance-csharp 320 @chmod +x conformance-csharp 321 322conformance-php: 323 @echo "Writing shortcut script conformance-php..." 324 @echo '#! /bin/sh' > conformance-php 325 @echo 'php -d auto_prepend_file=autoload.php ./conformance_php.php' >> conformance-php 326 @chmod +x conformance-php 327 328conformance-php-c: 329 @echo "Writing shortcut script conformance-php-c..." 330 @echo '#! /bin/sh' > conformance-php-c 331 @echo 'php -dextension=../php/ext/google/protobuf/modules/protobuf.so ./conformance_php.php' >> conformance-php-c 332 @chmod +x conformance-php-c 333 334# Targets for actually running tests. 335test_cpp: protoc_middleman conformance-test-runner conformance-cpp 336 ./conformance-test-runner --enforce_recommended --failure_list failure_list_cpp.txt ./conformance-cpp 337 338test_java: protoc_middleman conformance-test-runner conformance-java 339 ./conformance-test-runner --enforce_recommended --failure_list failure_list_java.txt --text_format_failure_list text_format_failure_list_java.txt ./conformance-java 340 341test_java_lite: protoc_middleman conformance-test-runner conformance-java-lite 342 ./conformance-test-runner --enforce_recommended ./conformance-java-lite 343 344test_csharp: protoc_middleman conformance-test-runner conformance-csharp 345 ./conformance-test-runner --enforce_recommended --failure_list failure_list_csharp.txt --text_format_failure_list text_format_failure_list_csharp.txt ./conformance-csharp 346 347test_ruby: protoc_middleman conformance-test-runner $(other_language_protoc_outputs) 348 RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb 349 350test_ruby_mac: protoc_middleman conformance-test-runner $(other_language_protoc_outputs) 351 RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby_mac.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb 352 353test_php: protoc_middleman conformance-test-runner conformance-php $(other_language_protoc_outputs) 354 ./conformance-test-runner --enforce_recommended --failure_list failure_list_php.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php 355 356test_php_c: protoc_middleman conformance-test-runner conformance-php-c $(other_language_protoc_outputs) 357 ./conformance-test-runner --enforce_recommended --failure_list failure_list_php_c.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php-c 358 359test_php_zts_c: protoc_middleman conformance-test-runner conformance-php-c $(other_language_protoc_outputs) 360 ./conformance-test-runner --enforce_recommended --failure_list failure_list_php_zts_c.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php-c 361 362# These depend on library paths being properly set up. The easiest way to 363# run them is to just use "tox" from the python dir. 364test_python: protoc_middleman conformance-test-runner 365 ./conformance-test-runner --enforce_recommended --failure_list failure_list_python.txt --text_format_failure_list text_format_failure_list_python.txt ./conformance_python.py 366 367test_python_cpp: protoc_middleman conformance-test-runner 368 ./conformance-test-runner --enforce_recommended --failure_list failure_list_python_cpp.txt ./conformance_python.py 369 370test_nodejs: protoc_middleman conformance-test-runner $(other_language_protoc_outputs) 371 NODE_PATH=../js:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_js.txt ./conformance_nodejs.js 372 373if OBJC_CONFORMANCE_TEST 374 375test_objc: protoc_middleman conformance-test-runner conformance-objc 376 ./conformance-test-runner --enforce_recommended --failure_list failure_list_objc.txt ./conformance-objc 377 378endif 379