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