]>
Commit | Line | Data |
---|---|---|
c19d590f JB |
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 | |
8a85b52c | 3 | @@ -11,28 +11,8 @@ |
c19d590f JB |
4 | # Always include third_party directories in distributions. |
5 | DIST_SUBDIRS = src conformance benchmarks third_party/googletest | |
0759da77 | 6 | |
8a85b52c JB |
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, | |
0759da77 | 9 | -# which takes a lot of time and is generally not useful to us. Also, we don't |
8a85b52c JB |
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. | |
0759da77 | 12 | -check-local: |
8a85b52c | 13 | - @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock" |
c19d590f JB |
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 | |
0759da77 | 16 | - |
8a85b52c | 17 | -# We would like to clean gmock when "make clean" is invoked. But we have to |
0759da77 | 18 | -# be careful because clean-local is also invoked during "make distclean", but |
8a85b52c JB |
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 | |
0759da77 ER |
21 | -# cd to the directory again and "make clean" it will fail. So, check that the |
22 | -# Makefile exists before recursing. | |
8a85b52c | 23 | clean-local: |
c19d590f JB |
24 | - @if test -e third_party/googletest/Makefile; then \ |
25 | - echo "Making clean in googletest"; \ | |
26 | - cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \ | |
8a85b52c JB |
27 | - fi; \ |
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; \ | |
32 | fi; \ | |
c19d590f JB |
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 | |
d2d20125 | 35 | @@ -692,19 +692,17 @@ |
8a85b52c JB |
36 | google/protobuf/testing/file.cc \ |
37 | google/protobuf/testing/file.h | |
0759da77 | 38 | |
c19d590f JB |
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 | |
c19d590f | 43 | +GOOGLETEST_INC_DIR=/usr/include/gtest |
d2d20125 | 44 | +GOOGLEMOCK_INC_DIR=/usr/include/gmock |
0759da77 | 45 | check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ |
8a85b52c JB |
46 | protobuf-lite-test test_plugin protobuf-lite-arena-test \ |
47 | no-warning-test $(GZCHECKPROGRAMS) | |
0759da77 | 48 | protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ |
c19d590f JB |
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 | |
54 | + -lgtest \ | |
d2d20125 JB |
55 | + -lgmock_main \ |
56 | + -lgmock | |
c19d590f JB |
57 | +protobuf_test_CPPFLAGS = -I$(GOOGLETEST_INC_DIR) \ |
58 | + -I$(GOOGLEMOCK_INC_DIR) | |
0759da77 ER |
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. | |
d2d20125 | 62 | @@ -792,11 +790,11 @@ |
0759da77 ER |
63 | # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. |
64 | protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ | |
72bc381c | 65 | libprotoc.la \ |
c19d590f JB |
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 \ | |
71 | + -lgtest \ | |
d2d20125 JB |
72 | + -lgmock_main \ |
73 | + -lgmock | |
c19d590f JB |
74 | +protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_INC_DIR) \ |
75 | + -I$(GOOGLETEST_INC_DIR) \ | |
72bc381c | 76 | -DPROTOBUF_TEST_NO_DESCRIPTORS |
0759da77 ER |
77 | protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
78 | protobuf_lazy_descriptor_test_SOURCES = \ | |
d2d20125 | 79 | @@ -818,11 +816,11 @@ |
50af910a JB |
80 | # full runtime and we want to make sure this test builds without full |
81 | # runtime. | |
c19d590f JB |
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 | |
88 | + -lgtest \ | |
d2d20125 JB |
89 | + -lgmock_main \ |
90 | + -lgmock | |
c19d590f JB |
91 | +protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_INC_DIR) \ |
92 | + -I$(GOOGLETEST_INC_DIR) | |
50af910a | 93 | protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
c19d590f JB |
94 | protobuf_lite_test_SOURCES = \ |
95 | google/protobuf/lite_unittest.cc \ | |
d2d20125 | 96 | @@ -834,11 +832,11 @@ |
8a85b52c JB |
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 \ | |
c19d590f JB |
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 | |
105 | + -lgtest \ | |
d2d20125 JB |
106 | + -lgmock_main \ |
107 | + -lgmock | |
c19d590f JB |
108 | +protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_INC_DIR) \ |
109 | + -I$(GOOGLETEST_INC_DIR) | |
8a85b52c JB |
110 | protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
111 | protobuf_lite_arena_test_SOURCES = \ | |
112 | google/protobuf/lite_arena_unittest.cc \ | |
d2d20125 | 113 | @@ -848,8 +846,8 @@ |
0759da77 ER |
114 | |
115 | # Test plugin binary. | |
116 | test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ | |
c19d590f JB |
117 | - $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la |
118 | -test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include | |
0759da77 | 119 | + -lgtest |
c19d590f | 120 | +test_plugin_CPPFLAGS = -I$(GOOGLETEST_INC_DIR) |
0759da77 | 121 | test_plugin_SOURCES = \ |
8a85b52c JB |
122 | google/protobuf/compiler/mock_code_generator.cc \ |
123 | google/protobuf/testing/file.cc \ |