Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 1 | ## Process this file with automake to produce Makefile.in |
| 2 | |
Josh Haberman | 7e74a02 | 2016-01-12 08:56:17 -0800 | [diff] [blame] | 3 | conformance_protoc_inputs = \ |
| 4 | conformance.proto |
| 5 | |
| 6 | well_known_type_protoc_inputs = \ |
Josh Haberman | e891c29 | 2015-12-30 16:03:49 -0800 | [diff] [blame] | 7 | $(top_srcdir)/src/google/protobuf/any.proto \ |
| 8 | $(top_srcdir)/src/google/protobuf/duration.proto \ |
| 9 | $(top_srcdir)/src/google/protobuf/field_mask.proto \ |
| 10 | $(top_srcdir)/src/google/protobuf/struct.proto \ |
| 11 | $(top_srcdir)/src/google/protobuf/timestamp.proto \ |
| 12 | $(top_srcdir)/src/google/protobuf/wrappers.proto |
| 13 | |
Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 14 | |
| 15 | protoc_outputs = \ |
| 16 | conformance.pb.cc \ |
| 17 | conformance.pb.h |
| 18 | |
Thomas Van Lenten | 42f2eee | 2015-11-16 11:24:58 -0500 | [diff] [blame] | 19 | other_language_protoc_outputs = \ |
| 20 | conformance.rb \ |
Thomas Van Lenten | 1745f7e | 2015-11-17 10:18:49 -0500 | [diff] [blame] | 21 | com/google/protobuf/conformance/Conformance.java \ |
Thomas Van Lenten | a20d0b6 | 2015-12-10 15:34:34 -0500 | [diff] [blame] | 22 | conformance_pb2.py \ |
Thomas Van Lenten | 1745f7e | 2015-11-17 10:18:49 -0500 | [diff] [blame] | 23 | Conformance.pbobjc.h \ |
| 24 | Conformance.pbobjc.m |
Thomas Van Lenten | 42f2eee | 2015-11-16 11:24:58 -0500 | [diff] [blame] | 25 | |
Josh Haberman | 4e63b52 | 2015-04-14 13:45:39 -0700 | [diff] [blame] | 26 | bin_PROGRAMS = conformance-test-runner conformance-cpp |
Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 27 | |
Feng Xiao | b7610f1 | 2015-12-22 14:36:04 -0800 | [diff] [blame] | 28 | # All source files excepet C++/Objective-C ones should be explicitly listed |
| 29 | # here because the autoconf tools don't include files of other languages |
| 30 | # automatically. |
| 31 | EXTRA_DIST = \ |
| 32 | ConformanceJava.java \ |
| 33 | README.md \ |
| 34 | conformance.proto \ |
| 35 | conformance_python.py \ |
| 36 | conformance_ruby.rb \ |
| 37 | failure_list_cpp.txt \ |
| 38 | failure_list_csharp.txt \ |
| 39 | failure_list_java.txt \ |
| 40 | failure_list_objc.txt \ |
| 41 | failure_list_python.txt \ |
| 42 | failure_list_python_cpp.txt \ |
Josh Haberman | ea909a5 | 2015-12-30 17:06:01 -0800 | [diff] [blame] | 43 | failure_list_python-post26.txt \ |
Feng Xiao | b7610f1 | 2015-12-22 14:36:04 -0800 | [diff] [blame] | 44 | failure_list_ruby.txt |
| 45 | |
Josh Haberman | 4e63b52 | 2015-04-14 13:45:39 -0700 | [diff] [blame] | 46 | conformance_test_runner_LDADD = $(top_srcdir)/src/libprotobuf.la |
Feng Xiao | b7610f1 | 2015-12-22 14:36:04 -0800 | [diff] [blame] | 47 | conformance_test_runner_SOURCES = conformance_test.h conformance_test.cc \ |
| 48 | conformance_test_runner.cc \ |
| 49 | third_party/jsoncpp/json.h \ |
Feng Xiao | a0cecfd | 2015-12-14 18:33:38 -0800 | [diff] [blame] | 50 | third_party/jsoncpp/jsoncpp.cpp |
Josh Haberman | 4e63b52 | 2015-04-14 13:45:39 -0700 | [diff] [blame] | 51 | nodist_conformance_test_runner_SOURCES = conformance.pb.cc |
Feng Xiao | a0cecfd | 2015-12-14 18:33:38 -0800 | [diff] [blame] | 52 | conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir) |
Feng Xiao | 1e2fece | 2015-12-18 15:16:07 -0800 | [diff] [blame] | 53 | conformance_test_runner_CXXFLAGS = -std=c++11 |
Thomas Van Lenten | 1745f7e | 2015-11-17 10:18:49 -0500 | [diff] [blame] | 54 | # Explicit deps beacuse BUILT_SOURCES are only done before a "make all/check" |
| 55 | # so a direct "make test_cpp" could fail if parallel enough. |
| 56 | conformance_test_runner-conformance_test.$(OBJEXT): conformance.pb.h |
| 57 | conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h |
Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 58 | |
| 59 | conformance_cpp_LDADD = $(top_srcdir)/src/libprotobuf.la |
| 60 | conformance_cpp_SOURCES = conformance_cpp.cc |
| 61 | nodist_conformance_cpp_SOURCES = conformance.pb.cc |
| 62 | conformance_cpp_CPPFLAGS = -I$(top_srcdir)/src |
Thomas Van Lenten | 1745f7e | 2015-11-17 10:18:49 -0500 | [diff] [blame] | 63 | # Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" |
| 64 | # so a direct "make test_cpp" could fail if parallel enough. |
| 65 | conformance_cpp-conformance_cpp.$(OBJEXT): conformance.pb.h |
| 66 | |
| 67 | if OBJC_CONFORMANCE_TEST |
| 68 | |
| 69 | bin_PROGRAMS += conformance-objc |
| 70 | |
| 71 | conformance_objc_SOURCES = conformance_objc.m ../objectivec/GPBProtocolBuffers.m |
| 72 | nodist_conformance_objc_SOURCES = Conformance.pbobjc.m |
Thomas Van Lenten | 69d713f | 2015-12-02 11:48:14 -0500 | [diff] [blame] | 73 | # On travis, the build fails without the isysroot because whatever system |
| 74 | # headers are being found don't include generics support for |
| 75 | # NSArray/NSDictionary, the only guess is their image at one time had an odd |
| 76 | # setup for Xcode and old frameworks are being found. |
| 77 | conformance_objc_CPPFLAGS = -I$(top_srcdir)/objectivec -isysroot `xcrun --sdk macosx --show-sdk-path` |
Thomas Van Lenten | 1745f7e | 2015-11-17 10:18:49 -0500 | [diff] [blame] | 78 | conformance_objc_LDFLAGS = -framework Foundation |
| 79 | # Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" |
| 80 | # so a direct "make test_objc" could fail if parallel enough. |
| 81 | conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h |
| 82 | |
| 83 | endif |
Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 84 | |
| 85 | if USE_EXTERNAL_PROTOC |
| 86 | |
Josh Haberman | 7e74a02 | 2016-01-12 08:56:17 -0800 | [diff] [blame] | 87 | # Some implementations include pre-generated versions of well-known types. |
| 88 | protoc_middleman: $(conformance_protoc_inputs) $(well_known_type_protoc_inputs) |
| 89 | $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --ruby_out=. --objc_out=. --python_out=. $(conformance_protoc_inputs) |
| 90 | $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --ruby_out=. --python_out=. $(well_known_type_protoc_inputs) |
Josh Haberman | 420f938 | 2015-04-16 12:50:39 -0700 | [diff] [blame] | 91 | touch protoc_middleman |
Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 92 | |
| 93 | else |
| 94 | |
| 95 | # We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is |
| 96 | # relative to srcdir, which may not be the same as the current directory when |
| 97 | # building out-of-tree. |
Josh Haberman | 7e74a02 | 2016-01-12 08:56:17 -0800 | [diff] [blame] | 98 | protoc_middleman: $(top_srcdir)/src/protoc$(EXEEXT) $(conformance_protoc_inputs) $(well_known_type_protoc_inputs) |
| 99 | 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) ) |
| 100 | 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) ) |
Josh Haberman | 420f938 | 2015-04-16 12:50:39 -0700 | [diff] [blame] | 101 | touch protoc_middleman |
Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 102 | |
| 103 | endif |
| 104 | |
Josh Haberman | 420f938 | 2015-04-16 12:50:39 -0700 | [diff] [blame] | 105 | $(protoc_outputs): protoc_middleman |
Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 106 | |
Thomas Van Lenten | 42f2eee | 2015-11-16 11:24:58 -0500 | [diff] [blame] | 107 | $(other_language_protoc_outputs): protoc_middleman |
| 108 | |
Thomas Van Lenten | 1745f7e | 2015-11-17 10:18:49 -0500 | [diff] [blame] | 109 | BUILT_SOURCES = $(protoc_outputs) $(other_language_protoc_outputs) |
Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 110 | |
Thomas Van Lenten | 42f2eee | 2015-11-16 11:24:58 -0500 | [diff] [blame] | 111 | CLEANFILES = $(protoc_outputs) protoc_middleman javac_middleman conformance-java conformance-csharp $(other_language_protoc_outputs) |
Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 112 | |
| 113 | MAINTAINERCLEANFILES = \ |
| 114 | Makefile.in |
| 115 | |
Thomas Van Lenten | 42f2eee | 2015-11-16 11:24:58 -0500 | [diff] [blame] | 116 | javac_middleman: ConformanceJava.java protoc_middleman $(other_language_protoc_outputs) |
Feng Xiao | ea95676 | 2016-01-14 14:29:51 -0800 | [diff] [blame] | 117 | jar=`ls ../java/util/target/*jar-with-dependencies.jar` && javac -classpath ../java/target/classes:$$jar ConformanceJava.java com/google/protobuf/conformance/Conformance.java |
Josh Haberman | 420f938 | 2015-04-16 12:50:39 -0700 | [diff] [blame] | 118 | @touch javac_middleman |
| 119 | |
| 120 | conformance-java: javac_middleman |
| 121 | @echo "Writing shortcut script conformance-java..." |
| 122 | @echo '#! /bin/sh' > conformance-java |
Feng Xiao | ea95676 | 2016-01-14 14:29:51 -0800 | [diff] [blame] | 123 | @jar=`ls ../java/util/target/*jar-with-dependencies.jar` && echo java -classpath .:../java/target/classes:$$jar ConformanceJava '$$@' >> conformance-java |
Josh Haberman | 420f938 | 2015-04-16 12:50:39 -0700 | [diff] [blame] | 124 | @chmod +x conformance-java |
| 125 | |
Jon Skeet | b6defa7 | 2015-08-04 10:01:40 +0100 | [diff] [blame] | 126 | # Currently the conformance code is alongside the rest of the C# |
| 127 | # source, as it's easier to maintain there. We assume we've already |
| 128 | # built that, so we just need a script to run it. |
Thomas Van Lenten | 42f2eee | 2015-11-16 11:24:58 -0500 | [diff] [blame] | 129 | conformance-csharp: $(other_language_protoc_outputs) |
Jon Skeet | b6defa7 | 2015-08-04 10:01:40 +0100 | [diff] [blame] | 130 | @echo "Writing shortcut script conformance-csharp..." |
| 131 | @echo '#! /bin/sh' > conformance-csharp |
| 132 | @echo 'mono ../csharp/src/Google.Protobuf.Conformance/bin/Release/Google.Protobuf.Conformance.exe "$$@"' >> conformance-csharp |
| 133 | @chmod +x conformance-csharp |
| 134 | |
Josh Haberman | 35a1cc7 | 2015-04-01 17:23:48 -0700 | [diff] [blame] | 135 | # Targets for actually running tests. |
Josh Haberman | 420f938 | 2015-04-16 12:50:39 -0700 | [diff] [blame] | 136 | test_cpp: protoc_middleman conformance-test-runner conformance-cpp |
Josh Haberman | d2b6738 | 2015-06-03 12:04:35 -0700 | [diff] [blame] | 137 | ./conformance-test-runner --failure_list failure_list_cpp.txt ./conformance-cpp |
Josh Haberman | 420f938 | 2015-04-16 12:50:39 -0700 | [diff] [blame] | 138 | |
| 139 | test_java: protoc_middleman conformance-test-runner conformance-java |
Feng Xiao | a0cecfd | 2015-12-14 18:33:38 -0800 | [diff] [blame] | 140 | ./conformance-test-runner --failure_list failure_list_java.txt ./conformance-java |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 141 | |
Jon Skeet | b6defa7 | 2015-08-04 10:01:40 +0100 | [diff] [blame] | 142 | test_csharp: protoc_middleman conformance-test-runner conformance-csharp |
| 143 | ./conformance-test-runner --failure_list failure_list_csharp.txt ./conformance-csharp |
| 144 | |
Thomas Van Lenten | 42f2eee | 2015-11-16 11:24:58 -0500 | [diff] [blame] | 145 | test_ruby: protoc_middleman conformance-test-runner $(other_language_protoc_outputs) |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 146 | RUBYLIB=../ruby/lib:. ./conformance-test-runner --failure_list failure_list_ruby.txt ./conformance_ruby.rb |
Thomas Van Lenten | 1745f7e | 2015-11-17 10:18:49 -0500 | [diff] [blame] | 147 | |
Josh Haberman | 325392d | 2015-08-17 12:30:49 -0700 | [diff] [blame] | 148 | # These depend on library paths being properly set up. The easiest way to |
| 149 | # run them is to just use "tox" from the python dir. |
| 150 | test_python: protoc_middleman conformance-test-runner |
Josh Haberman | e891c29 | 2015-12-30 16:03:49 -0800 | [diff] [blame] | 151 | ./conformance-test-runner --failure_list failure_list_python.txt $(CONFORMANCE_PYTHON_EXTRA_FAILURES) ./conformance_python.py |
Josh Haberman | 325392d | 2015-08-17 12:30:49 -0700 | [diff] [blame] | 152 | |
| 153 | test_python_cpp: protoc_middleman conformance-test-runner |
Josh Haberman | e891c29 | 2015-12-30 16:03:49 -0800 | [diff] [blame] | 154 | ./conformance-test-runner --failure_list failure_list_python_cpp.txt $(CONFORMANCE_PYTHON_EXTRA_FAILURES) ./conformance_python.py |
Josh Haberman | 325392d | 2015-08-17 12:30:49 -0700 | [diff] [blame] | 155 | |
Thomas Van Lenten | 1745f7e | 2015-11-17 10:18:49 -0500 | [diff] [blame] | 156 | if OBJC_CONFORMANCE_TEST |
| 157 | |
| 158 | test_objc: protoc_middleman conformance-test-runner conformance-objc |
| 159 | ./conformance-test-runner --failure_list failure_list_objc.txt ./conformance-objc |
| 160 | |
| 161 | endif |