Makefile.am 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. ## Process this file with automake to produce Makefile.in
  2. conformance_protoc_inputs = \
  3. conformance.proto
  4. well_known_type_protoc_inputs = \
  5. $(top_srcdir)/src/google/protobuf/any.proto \
  6. $(top_srcdir)/src/google/protobuf/duration.proto \
  7. $(top_srcdir)/src/google/protobuf/field_mask.proto \
  8. $(top_srcdir)/src/google/protobuf/struct.proto \
  9. $(top_srcdir)/src/google/protobuf/timestamp.proto \
  10. $(top_srcdir)/src/google/protobuf/wrappers.proto
  11. protoc_outputs = \
  12. conformance.pb.cc \
  13. conformance.pb.h
  14. other_language_protoc_outputs = \
  15. conformance_pb2.py \
  16. Conformance.pbobjc.h \
  17. Conformance.pbobjc.m \
  18. conformance.rb \
  19. com/google/protobuf/Any.java \
  20. com/google/protobuf/AnyOrBuilder.java \
  21. com/google/protobuf/AnyProto.java \
  22. com/google/protobuf/BoolValue.java \
  23. com/google/protobuf/BoolValueOrBuilder.java \
  24. com/google/protobuf/BytesValue.java \
  25. com/google/protobuf/BytesValueOrBuilder.java \
  26. com/google/protobuf/conformance/Conformance.java \
  27. com/google/protobuf/DoubleValue.java \
  28. com/google/protobuf/DoubleValueOrBuilder.java \
  29. com/google/protobuf/Duration.java \
  30. com/google/protobuf/DurationOrBuilder.java \
  31. com/google/protobuf/DurationProto.java \
  32. com/google/protobuf/FieldMask.java \
  33. com/google/protobuf/FieldMaskOrBuilder.java \
  34. com/google/protobuf/FieldMaskProto.java \
  35. com/google/protobuf/FloatValue.java \
  36. com/google/protobuf/FloatValueOrBuilder.java \
  37. com/google/protobuf/Int32Value.java \
  38. com/google/protobuf/Int32ValueOrBuilder.java \
  39. com/google/protobuf/Int64Value.java \
  40. com/google/protobuf/Int64ValueOrBuilder.java \
  41. com/google/protobuf/ListValue.java \
  42. com/google/protobuf/ListValueOrBuilder.java \
  43. com/google/protobuf/NullValue.java \
  44. com/google/protobuf/StringValue.java \
  45. com/google/protobuf/StringValueOrBuilder.java \
  46. com/google/protobuf/Struct.java \
  47. com/google/protobuf/StructOrBuilder.java \
  48. com/google/protobuf/StructProto.java \
  49. com/google/protobuf/Timestamp.java \
  50. com/google/protobuf/TimestampOrBuilder.java \
  51. com/google/protobuf/TimestampProto.java \
  52. com/google/protobuf/UInt32Value.java \
  53. com/google/protobuf/UInt32ValueOrBuilder.java \
  54. com/google/protobuf/UInt64Value.java \
  55. com/google/protobuf/UInt64ValueOrBuilder.java \
  56. com/google/protobuf/Value.java \
  57. com/google/protobuf/ValueOrBuilder.java \
  58. com/google/protobuf/WrappersProto.java \
  59. google/protobuf/any.pb.cc \
  60. google/protobuf/any.pb.h \
  61. google/protobuf/any.rb \
  62. google/protobuf/any_pb2.py \
  63. google/protobuf/duration.pb.cc \
  64. google/protobuf/duration.pb.h \
  65. google/protobuf/duration.rb \
  66. google/protobuf/duration_pb2.py \
  67. google/protobuf/field_mask.pb.cc \
  68. google/protobuf/field_mask.pb.h \
  69. google/protobuf/field_mask.rb \
  70. google/protobuf/field_mask_pb2.py \
  71. google/protobuf/struct.pb.cc \
  72. google/protobuf/struct.pb.h \
  73. google/protobuf/struct.rb \
  74. google/protobuf/struct_pb2.py \
  75. google/protobuf/timestamp.pb.cc \
  76. google/protobuf/timestamp.pb.h \
  77. google/protobuf/timestamp.rb \
  78. google/protobuf/timestamp_pb2.py \
  79. google/protobuf/wrappers.pb.cc \
  80. google/protobuf/wrappers.pb.h \
  81. google/protobuf/wrappers.rb \
  82. google/protobuf/wrappers_pb2.py
  83. # lite/com/google/protobuf/Any.java \
  84. # lite/com/google/protobuf/AnyOrBuilder.java \
  85. # lite/com/google/protobuf/AnyProto.java \
  86. # lite/com/google/protobuf/BoolValue.java \
  87. # lite/com/google/protobuf/BoolValueOrBuilder.java \
  88. # lite/com/google/protobuf/BytesValue.java \
  89. # lite/com/google/protobuf/BytesValueOrBuilder.java \
  90. # lite/com/google/protobuf/conformance/Conformance.java \
  91. # lite/com/google/protobuf/DoubleValue.java \
  92. # lite/com/google/protobuf/DoubleValueOrBuilder.java \
  93. # lite/com/google/protobuf/Duration.java \
  94. # lite/com/google/protobuf/DurationOrBuilder.java \
  95. # lite/com/google/protobuf/DurationProto.java \
  96. # lite/com/google/protobuf/FieldMask.java \
  97. # lite/com/google/protobuf/FieldMaskOrBuilder.java \
  98. # lite/com/google/protobuf/FieldMaskProto.java \
  99. # lite/com/google/protobuf/FloatValue.java \
  100. # lite/com/google/protobuf/FloatValueOrBuilder.java \
  101. # lite/com/google/protobuf/Int32Value.java \
  102. # lite/com/google/protobuf/Int32ValueOrBuilder.java \
  103. # lite/com/google/protobuf/Int64Value.java \
  104. # lite/com/google/protobuf/Int64ValueOrBuilder.java \
  105. # lite/com/google/protobuf/ListValue.java \
  106. # lite/com/google/protobuf/ListValueOrBuilder.java \
  107. # lite/com/google/protobuf/NullValue.java \
  108. # lite/com/google/protobuf/StringValue.java \
  109. # lite/com/google/protobuf/StringValueOrBuilder.java \
  110. # lite/com/google/protobuf/Struct.java \
  111. # lite/com/google/protobuf/StructOrBuilder.java \
  112. # lite/com/google/protobuf/StructProto.java \
  113. # lite/com/google/protobuf/Timestamp.java \
  114. # lite/com/google/protobuf/TimestampOrBuilder.java \
  115. # lite/com/google/protobuf/TimestampProto.java \
  116. # lite/com/google/protobuf/UInt32Value.java \
  117. # lite/com/google/protobuf/UInt32ValueOrBuilder.java \
  118. # lite/com/google/protobuf/UInt64Value.java \
  119. # lite/com/google/protobuf/UInt64ValueOrBuilder.java \
  120. # lite/com/google/protobuf/Value.java \
  121. # lite/com/google/protobuf/ValueOrBuilder.java \
  122. # lite/com/google/protobuf/WrappersProto.java
  123. bin_PROGRAMS = conformance-test-runner conformance-cpp
  124. # All source files excepet C++/Objective-C ones should be explicitly listed
  125. # here because the autoconf tools don't include files of other languages
  126. # automatically.
  127. EXTRA_DIST = \
  128. ConformanceJava.java \
  129. ConformanceJavaLite.java \
  130. README.md \
  131. conformance.proto \
  132. conformance_python.py \
  133. conformance_ruby.rb \
  134. failure_list_cpp.txt \
  135. failure_list_csharp.txt \
  136. failure_list_java.txt \
  137. failure_list_objc.txt \
  138. failure_list_python.txt \
  139. failure_list_python_cpp.txt \
  140. failure_list_python-post26.txt \
  141. failure_list_ruby.txt
  142. conformance_test_runner_LDADD = $(top_srcdir)/src/libprotobuf.la
  143. conformance_test_runner_SOURCES = conformance_test.h conformance_test.cc \
  144. conformance_test_runner.cc \
  145. third_party/jsoncpp/json.h \
  146. third_party/jsoncpp/jsoncpp.cpp
  147. nodist_conformance_test_runner_SOURCES = conformance.pb.cc
  148. conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir)
  149. conformance_test_runner_CXXFLAGS = -std=c++11
  150. # Explicit deps beacuse BUILT_SOURCES are only done before a "make all/check"
  151. # so a direct "make test_cpp" could fail if parallel enough.
  152. conformance_test_runner-conformance_test.$(OBJEXT): conformance.pb.h
  153. conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h
  154. conformance_cpp_LDADD = $(top_srcdir)/src/libprotobuf.la
  155. conformance_cpp_SOURCES = conformance_cpp.cc
  156. nodist_conformance_cpp_SOURCES = conformance.pb.cc
  157. conformance_cpp_CPPFLAGS = -I$(top_srcdir)/src
  158. # Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check"
  159. # so a direct "make test_cpp" could fail if parallel enough.
  160. conformance_cpp-conformance_cpp.$(OBJEXT): conformance.pb.h
  161. if OBJC_CONFORMANCE_TEST
  162. bin_PROGRAMS += conformance-objc
  163. conformance_objc_SOURCES = conformance_objc.m ../objectivec/GPBProtocolBuffers.m
  164. nodist_conformance_objc_SOURCES = Conformance.pbobjc.m
  165. # On travis, the build fails without the isysroot because whatever system
  166. # headers are being found don't include generics support for
  167. # NSArray/NSDictionary, the only guess is their image at one time had an odd
  168. # setup for Xcode and old frameworks are being found.
  169. conformance_objc_CPPFLAGS = -I$(top_srcdir)/objectivec -isysroot `xcrun --sdk macosx --show-sdk-path`
  170. conformance_objc_LDFLAGS = -framework Foundation
  171. # Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check"
  172. # so a direct "make test_objc" could fail if parallel enough.
  173. conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h
  174. endif
  175. if USE_EXTERNAL_PROTOC
  176. # Some implementations include pre-generated versions of well-known types.
  177. protoc_middleman: $(conformance_protoc_inputs) $(well_known_type_protoc_inputs)
  178. $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --ruby_out=. --objc_out=. --python_out=. $(conformance_protoc_inputs)
  179. $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --ruby_out=. --python_out=. $(well_known_type_protoc_inputs)
  180. ## $(PROTOC) -I$(srcdir) -I$(top_srcdir) --java_out=lite:lite $(conformance_protoc_inputs) $(well_known_type_protoc_inputs)
  181. touch protoc_middleman
  182. else
  183. # We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is
  184. # relative to srcdir, which may not be the same as the current directory when
  185. # building out-of-tree.
  186. protoc_middleman: $(top_srcdir)/src/protoc$(EXEEXT) $(conformance_protoc_inputs) $(well_known_type_protoc_inputs)
  187. 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 $(conformance_protoc_inputs) )
  188. 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 $(well_known_type_protoc_inputs) )
  189. ## @mkdir -p lite
  190. ## 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) )
  191. touch protoc_middleman
  192. endif
  193. $(protoc_outputs): protoc_middleman
  194. $(other_language_protoc_outputs): protoc_middleman
  195. BUILT_SOURCES = $(protoc_outputs) $(other_language_protoc_outputs)
  196. CLEANFILES = $(protoc_outputs) protoc_middleman javac_middleman conformance-java javac_middleman_lite conformance-java-lite conformance-csharp $(other_language_protoc_outputs)
  197. MAINTAINERCLEANFILES = \
  198. Makefile.in
  199. javac_middleman: ConformanceJava.java protoc_middleman $(other_language_protoc_outputs)
  200. jar=`ls ../java/util/target/*jar-with-dependencies.jar` && javac -classpath ../java/target/classes:$$jar ConformanceJava.java com/google/protobuf/conformance/Conformance.java
  201. @touch javac_middleman
  202. conformance-java: javac_middleman
  203. @echo "Writing shortcut script conformance-java..."
  204. @echo '#! /bin/sh' > conformance-java
  205. @jar=`ls ../java/util/target/*jar-with-dependencies.jar` && echo java -classpath .:../java/target/classes:$$jar ConformanceJava '$$@' >> conformance-java
  206. @chmod +x conformance-java
  207. javac_middleman_lite: ConformanceJavaLite.java protoc_middleman $(other_language_protoc_outputs)
  208. javac -classpath ../java/lite/target/classes:lite ConformanceJavaLite.java lite/com/google/protobuf/conformance/Conformance.java
  209. @touch javac_middleman_lite
  210. conformance-java-lite: javac_middleman_lite
  211. @echo "Writing shortcut script conformance-java-lite..."
  212. @echo '#! /bin/sh' > conformance-java-lite
  213. @echo java -classpath .:../java/lite/target/classes:lite ConformanceJavaLite '$$@' >> conformance-java-lite
  214. @chmod +x conformance-java-lite
  215. # Currently the conformance code is alongside the rest of the C#
  216. # source, as it's easier to maintain there. We assume we've already
  217. # built that, so we just need a script to run it.
  218. conformance-csharp: $(other_language_protoc_outputs)
  219. @echo "Writing shortcut script conformance-csharp..."
  220. @echo '#! /bin/sh' > conformance-csharp
  221. @echo 'dotnet ../csharp/src/Google.Protobuf.Conformance/bin/Release/netcoreapp1.0/Google.Protobuf.Conformance.dll "$$@"' >> conformance-csharp
  222. @chmod +x conformance-csharp
  223. # Targets for actually running tests.
  224. test_cpp: protoc_middleman conformance-test-runner conformance-cpp
  225. ./conformance-test-runner --failure_list failure_list_cpp.txt ./conformance-cpp
  226. test_java: protoc_middleman conformance-test-runner conformance-java
  227. ./conformance-test-runner --failure_list failure_list_java.txt ./conformance-java
  228. test_java_lite: protoc_middleman conformance-test-runner conformance-java-lite
  229. ./conformance-test-runner ./conformance-java-lite
  230. test_csharp: protoc_middleman conformance-test-runner conformance-csharp
  231. ./conformance-test-runner --failure_list failure_list_csharp.txt ./conformance-csharp
  232. test_ruby: protoc_middleman conformance-test-runner $(other_language_protoc_outputs)
  233. RUBYLIB=../ruby/lib:. ./conformance-test-runner --failure_list failure_list_ruby.txt ./conformance_ruby.rb
  234. # These depend on library paths being properly set up. The easiest way to
  235. # run them is to just use "tox" from the python dir.
  236. test_python: protoc_middleman conformance-test-runner
  237. ./conformance-test-runner --failure_list failure_list_python.txt ./conformance_python.py
  238. test_python_cpp: protoc_middleman conformance-test-runner
  239. ./conformance-test-runner --failure_list failure_list_python_cpp.txt ./conformance_python.py
  240. if OBJC_CONFORMANCE_TEST
  241. test_objc: protoc_middleman conformance-test-runner conformance-objc
  242. ./conformance-test-runner --failure_list failure_list_objc.txt ./conformance-objc
  243. endif