1 --- protobuf-3.6.1/Makefile.am.orig 2018-10-12 17:44:11.446510724 +0200
2 +++ protobuf-3.6.1/Makefile.am 2018-10-12 17:46:58.769842145 +0200
4 # Always include third_party directories in distributions.
5 DIST_SUBDIRS = src conformance benchmarks third_party/googletest
7 -# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
8 -# because then "make check" would also build and run all of gmock's own tests,
9 -# which takes a lot of time and is generally not useful to us. Also, we don't
10 -# want "make install" to recurse into gmock since we don't want to overwrite
11 -# the installed version of gmock if there is one.
13 - @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
14 - @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
15 - @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
17 -# We would like to clean gmock when "make clean" is invoked. But we have to
18 -# be careful because clean-local is also invoked during "make distclean", but
19 -# "make distclean" already recurses into gmock because it's listed among the
20 -# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
21 -# cd to the directory again and "make clean" it will fail. So, check that the
22 -# Makefile exists before recursing.
24 - @if test -e third_party/googletest/Makefile; then \
25 - echo "Making clean in googletest"; \
26 - cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
28 - if test -e conformance/Makefile; then \
29 + @if test -e conformance/Makefile; then \
30 echo "Making clean in conformance"; \
31 cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
33 --- protobuf-3.6.1/src/Makefile.am.orig 2018-10-12 17:44:11.446510724 +0200
34 +++ protobuf-3.6.1/src/Makefile.am 2018-10-12 18:23:32.609817094 +0200
36 google/protobuf/testing/file.cc \
37 google/protobuf/testing/file.h
39 -GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
40 -GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
41 -GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
42 -GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
43 +GOOGLETEST_INC_DIR=/usr/include/gtest
44 +GOOGLEMOCK_INC_DIR=/usr/include/gmock
45 check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
46 protobuf-lite-test test_plugin protobuf-lite-arena-test \
47 no-warning-test $(GZCHECKPROGRAMS)
48 protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
49 - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
50 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
51 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
52 -protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
53 - -I$(GOOGLEMOCK_SRC_DIR)/include
57 +protobuf_test_CPPFLAGS = -I$(GOOGLETEST_INC_DIR) \
58 + -I$(GOOGLEMOCK_INC_DIR)
59 # Disable optimization for tests unless the user explicitly asked for it,
60 # since test_util.cc takes forever to compile with optimization (with GCC).
61 # See configure.ac for more info.
63 # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
64 protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
66 - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
67 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
68 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
69 -protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
70 - -I$(GOOGLETEST_SRC_DIR)/include \
74 +protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_INC_DIR) \
75 + -I$(GOOGLETEST_INC_DIR) \
76 -DPROTOBUF_TEST_NO_DESCRIPTORS
77 protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
78 protobuf_lazy_descriptor_test_SOURCES = \
80 # full runtime and we want to make sure this test builds without full
82 protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
83 - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
84 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
85 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
86 -protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
87 - -I$(GOOGLETEST_SRC_DIR)/include
91 +protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_INC_DIR) \
92 + -I$(GOOGLETEST_INC_DIR)
93 protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
94 protobuf_lite_test_SOURCES = \
95 google/protobuf/lite_unittest.cc \
97 # gtest when building the test internally our memory sanitizer doesn't detect
98 # memory leaks (don't know why).
99 protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
100 - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
101 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
102 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
103 -protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
104 - -I$(GOOGLETEST_SRC_DIR)/include
108 +protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_INC_DIR) \
109 + -I$(GOOGLETEST_INC_DIR)
110 protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
111 protobuf_lite_arena_test_SOURCES = \
112 google/protobuf/lite_arena_unittest.cc \
115 # Test plugin binary.
116 test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
117 - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
118 -test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
120 +test_plugin_CPPFLAGS = -I$(GOOGLETEST_INC_DIR)
121 test_plugin_SOURCES = \
122 google/protobuf/compiler/mock_code_generator.cc \
123 google/protobuf/testing/file.cc \