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 +gmock_dir = /usr/src/gmock/src
44 +gmock_inc_dir = /usr/src/gmock/src
45 +gtest_inc_dir = /usr/include/gtest
46 +check_LTLIBRARIES = libgmock.la libgmock_main.la
47 +libgmock_la_SOURCES = ./gmock-all.cc
48 +libgmock_main_la_SOURCES = ./gmock_main.cc
50 +GOOGLETEST_INC_DIR=/usr/include/gtest
51 +GOOGLEMOCK_INC_DIR=/usr/src/gmock/src
52 check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
53 protobuf-lite-test test_plugin protobuf-lite-arena-test \
54 no-warning-test $(GZCHECKPROGRAMS)
55 protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
56 - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
57 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
58 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
59 -protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
60 - -I$(GOOGLEMOCK_SRC_DIR)/include
64 +protobuf_test_CPPFLAGS = -I$(GOOGLETEST_INC_DIR) \
65 + -I$(GOOGLEMOCK_INC_DIR)
66 # Disable optimization for tests unless the user explicitly asked for it,
67 # since test_util.cc takes forever to compile with optimization (with GCC).
68 # See configure.ac for more info.
70 # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
71 protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
73 - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
74 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
75 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
76 -protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
77 - -I$(GOOGLETEST_SRC_DIR)/include \
81 +protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_INC_DIR) \
82 + -I$(GOOGLETEST_INC_DIR) \
83 -DPROTOBUF_TEST_NO_DESCRIPTORS
84 protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
85 protobuf_lazy_descriptor_test_SOURCES = \
87 # full runtime and we want to make sure this test builds without full
89 protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
90 - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
91 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
92 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
93 -protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
94 - -I$(GOOGLETEST_SRC_DIR)/include
98 +protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_INC_DIR) \
99 + -I$(GOOGLETEST_INC_DIR)
100 protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
101 protobuf_lite_test_SOURCES = \
102 google/protobuf/lite_unittest.cc \
103 @@ -834,11 +839,11 @@
104 # gtest when building the test internally our memory sanitizer doesn't detect
105 # memory leaks (don't know why).
106 protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
107 - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
108 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
109 - $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
110 -protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
111 - -I$(GOOGLETEST_SRC_DIR)/include
115 +protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_INC_DIR) \
116 + -I$(GOOGLETEST_INC_DIR)
117 protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
118 protobuf_lite_arena_test_SOURCES = \
119 google/protobuf/lite_arena_unittest.cc \
122 # Test plugin binary.
123 test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
124 - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
125 -test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
127 +test_plugin_CPPFLAGS = -I$(GOOGLETEST_INC_DIR)
128 test_plugin_SOURCES = \
129 google/protobuf/compiler/mock_code_generator.cc \
130 google/protobuf/testing/file.cc \