Skip to content

Commit 225a0f8

Browse files
committed
CDRIVER-1104 Actually remove the -priv.so creation
1 parent ad65f71 commit 225a0f8

File tree

5 files changed

+92
-100
lines changed

5 files changed

+92
-100
lines changed

Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ noinst_PROGRAMS =
1010
noinst_HEADERS =
1111

1212
SUBDIRS =
13-
libmongoc_1_0_la_DEPENDENCIES =
1413

1514
if WITH_LIBBSON
1615
SUBDIRS += src/libbson

src/Makefile.am

Lines changed: 17 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
lib_LTLIBRARIES += libmongoc-1.0.la
2+
3+
libmongoc_1_0_la_SOURCES =
4+
libmongoc_1_0_la_LIBADD = \
5+
libmongoc.la
6+
7+
libmongoc_1_0_la_LDFLAGS = \
8+
$(OPTIMIZE_LDFLAGS) \
9+
$(COVERAGE_LDFLAGS) \
10+
-fvisibility=hidden \
11+
-no-undefined \
12+
-rpath $(libdir)
13+
14+
15+
include src/mongoc/Makefile.am
16+
include src/tools/Makefile.am
17+
118
pkgconfigdir = $(libdir)/pkgconfig
219
pkgconfig_DATA = $(top_builddir)/src/libmongoc-1.0.pc
320
if ENABLE_SSL
@@ -9,76 +26,11 @@ if ENABLE_STATIC
926
endif
1027

1128

12-
lib_LTLIBRARIES += libmongoc-1.0.la
13-
14-
# For libmongoc-test and other test programs.
15-
noinst_LTLIBRARIES += libmongoc-priv.la
16-
17-
18-
MONGOC_CPPFLAGS_SHARED = \
19-
-DMONGOC_COMPILATION \
20-
$(LIBC_FEATURES) \
21-
$(MAINTAINER_CFLAGS) \
22-
$(OPTIMIZE_CFLAGS) \
23-
$(COVERAGE_CFLAGS) \
24-
-I$(top_srcdir)/src \
25-
-I$(top_srcdir)/src/mongoc \
26-
-I$(top_builddir)/src/mongoc \
27-
$(BSON_CFLAGS) \
28-
$(PTHREAD_CFLAGS) \
29-
$(SSL_CFLAGS) \
30-
$(SNAPPY_CFLAGS) \
31-
$(ZLIB_CFLAGS) \
32-
$(SASL_CFLAGS) \
33-
-fvisibility=hidden
34-
35-
if OS_SOLARIS
36-
MONGOC_CPPFLAGS_SHARED += -D_REENTRANT
37-
endif
38-
libmongoc_priv_la_CPPFLAGS = $(MONGOC_CPPFLAGS_SHARED)
39-
libmongoc_1_0_la_CPPFLAGS = $(MONGOC_CPPFLAGS_SHARED)
40-
41-
42-
MONGOC_LDFLAGS_SHARED = $(OPTIMIZE_LDFLAGS) $(COVERAGE_LDFLAGS)
43-
libmongoc_priv_la_LDFLAGS = \
44-
$(MONGOC_LDFLAGS_SHARED) \
45-
-no-undefined
46-
47-
libmongoc_1_0_la_LDFLAGS = \
48-
$(MONGOC_LDFLAGS_SHARED) \
49-
-no-undefined \
50-
-rpath $(libdir)
51-
5229
if WITH_SNAPPY
5330
# Use c++ linker
5431
nodist_EXTRA_libmongoc_1_0_la_SOURCES = dummy.cxx
5532
nodist_EXTRA_libmongoc_priv_la_SOURCES = dummy.cxx
5633
endif
57-
58-
MONGOC_LIBADD_SHARED = \
59-
$(BSON_LIBS) \
60-
$(PTHREAD_LIBS) \
61-
$(SHM_LIB) \
62-
$(SSL_LIBS) \
63-
$(SNAPPY_LIBS) \
64-
$(ZLIB_LIBS) \
65-
$(SASL_LIBS)
66-
67-
if OS_WIN32
68-
MONGOC_LIBADD_SHARED += -lws2_32
69-
endif
70-
libmongoc_priv_la_LIBADD = $(MONGOC_LIBADD_SHARED)
71-
libmongoc_1_0_la_LIBADD = $(MONGOC_LIBADD_SHARED)
72-
73-
74-
# Sources defined in src/mongoc/Makefile.am
75-
MONGOC_SOURCES_SHARED =
76-
libmongoc_1_0_la_SOURCES = $(MONGOC_SOURCES_SHARED)
77-
libmongoc_priv_la_SOURCES = $(MONGOC_SOURCES_SHARED)
78-
79-
include src/mongoc/Makefile.am
80-
include src/tools/Makefile.am
81-
8234
EXTRA_DIST += \
8335
src/libmongoc-1.0.pc.in \
8436
src/libmongoc-ssl-1.0.pc.in \

src/mongoc/Makefile.am

Lines changed: 55 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
noinst_LTLIBRARIES += libmongoc.la
2+
13
headerdir = $(prefix)/include/libmongoc-@MONGOC_API_VERSION@
24
header_DATA = \
35
$(INST_H_FILES) \
@@ -153,7 +155,7 @@ NOINST_H_FILES += \
153155
src/mongoc/mongoc-stream-tls-secure-transport-private.h
154156
endif
155157

156-
MONGOC_SOURCES_SHARED += \
158+
libmongoc_la_SOURCES = \
157159
$(INST_H_FILES) \
158160
src/mongoc/mongoc-apm.c \
159161
src/mongoc/mongoc-array.c \
@@ -213,72 +215,107 @@ MONGOC_SOURCES_SHARED += \
213215
src/mongoc/mongoc-write-concern.c
214216

215217
if ENABLE_CRYPTO
216-
MONGOC_SOURCES_SHARED += \
218+
libmongoc_la_SOURCES += \
217219
src/mongoc/mongoc-crypto.c \
218220
src/mongoc/mongoc-scram.c
219221

220222
if ENABLE_CRYPTO_LIBCRYPTO
221-
MONGOC_SOURCES_SHARED += \
223+
libmongoc_la_SOURCES += \
222224
src/mongoc/mongoc-crypto-openssl.c \
223225
src/mongoc/mongoc-rand-openssl.c
224226
endif
225227
if ENABLE_CRYPTO_COMMON_CRYPTO
226-
MONGOC_SOURCES_SHARED += \
228+
libmongoc_la_SOURCES += \
227229
src/mongoc/mongoc-crypto-common-crypto.c \
228230
src/mongoc/mongoc-rand-common-crypto.c
229231
endif
230232
if ENABLE_CRYPTO_CNG
231-
MONGOC_SOURCES_SHARED += \
233+
libmongoc_la_SOURCES += \
232234
src/mongoc/mongoc-crypto-cng.c \
233235
src/mongoc/mongoc-rand-cng.c
234236
endif
235237
endif
236238

237239
if ENABLE_SSL
238-
MONGOC_SOURCES_SHARED += \
240+
libmongoc_la_SOURCES += \
239241
src/mongoc/mongoc-stream-tls.c \
240242
src/mongoc/mongoc-ssl.c
241243

242244
if ENABLE_SSL_LIBRESSL
243-
MONGOC_SOURCES_SHARED += \
245+
libmongoc_la_SOURCES += \
244246
src/mongoc/mongoc-libressl.c \
245247
src/mongoc/mongoc-stream-tls-libressl.c
246248
endif
247249
if ENABLE_SSL_OPENSSL
248-
MONGOC_SOURCES_SHARED += \
250+
libmongoc_la_SOURCES += \
249251
src/mongoc/mongoc-openssl.c \
250252
src/mongoc/mongoc-stream-tls-openssl.c \
251253
src/mongoc/mongoc-stream-tls-openssl-bio.c
252254
endif
253255
if ENABLE_SSL_SECURE_TRANSPORT
254-
MONGOC_SOURCES_SHARED += \
256+
libmongoc_la_SOURCES += \
255257
src/mongoc/mongoc-secure-transport.c \
256258
src/mongoc/mongoc-stream-tls-secure-transport.c
257259
endif
258260
if ENABLE_SSL_SECURE_CHANNEL
259-
MONGOC_SOURCES_SHARED += \
261+
libmongoc_la_SOURCES += \
260262
src/mongoc/mongoc-secure-channel.c \
261263
src/mongoc/mongoc-stream-tls-secure-channel.c
262264
endif
263265
endif
264266

265267
if ENABLE_SASL
266-
MONGOC_SOURCES_SHARED += src/mongoc/mongoc-cluster-sasl.c
267-
MONGOC_SOURCES_SHARED += src/mongoc/mongoc-sasl.c
268+
libmongoc_la_SOURCES += src/mongoc/mongoc-cluster-sasl.c
269+
libmongoc_la_SOURCES += src/mongoc/mongoc-sasl.c
268270
endif
269271
if ENABLE_SASL_CYRUS
270-
MONGOC_SOURCES_SHARED += src/mongoc/mongoc-cluster-cyrus.c
271-
MONGOC_SOURCES_SHARED += src/mongoc/mongoc-cyrus.c
272+
libmongoc_la_SOURCES += src/mongoc/mongoc-cluster-cyrus.c
273+
libmongoc_la_SOURCES += src/mongoc/mongoc-cyrus.c
272274
endif
273275

274276
if ENABLE_SASL_SSPI
275-
MONGOC_SOURCES_SHARED += src/mongoc/mongoc-cluster-sspi.c
276-
MONGOC_SOURCES_SHARED += src/mongoc/mongoc-sspi.c
277+
libmongoc_la_SOURCES += src/mongoc/mongoc-cluster-sspi.c
278+
libmongoc_la_SOURCES += src/mongoc/mongoc-sspi.c
277279
endif
278280

279281
if ENABLE_SASL_GSSAPI
280-
MONGOC_SOURCES_SHARED += src/mongoc/mongoc-cluster-gssapi.c
281-
MONGOC_SOURCES_SHARED += src/mongoc/mongoc-gssapi.c
282+
libmongoc_la_SOURCES += src/mongoc/mongoc-cluster-gssapi.c
283+
libmongoc_la_SOURCES += src/mongoc/mongoc-gssapi.c
284+
endif
285+
286+
libmongoc_la_CPPFLAGS = \
287+
-DMONGOC_COMPILATION \
288+
$(LIBC_FEATURES) \
289+
-I$(top_srcdir)/src \
290+
-I$(top_srcdir)/src/mongoc \
291+
-I$(top_builddir)/src/mongoc \
292+
$(BSON_CFLAGS)
293+
294+
libmongoc_la_CFLAGS = \
295+
$(MAINTAINER_CFLAGS) \
296+
$(OPTIMIZE_CFLAGS) \
297+
$(COVERAGE_CFLAGS) \
298+
$(PTHREAD_CFLAGS) \
299+
$(SSL_CFLAGS) \
300+
$(SNAPPY_CFLAGS) \
301+
$(ZLIB_CFLAGS) \
302+
$(SASL_CFLAGS)
303+
304+
if OS_SOLARIS
305+
libmongoc_la_CFLAGS += -D_REENTRANT
306+
endif
307+
308+
libmongoc_la_LIBADD = \
309+
$(BSON_LIBS) \
310+
$(PTHREAD_LIBS) \
311+
$(SHM_LIB) \
312+
$(SSL_LIBS) \
313+
$(SNAPPY_LIBS) \
314+
$(ZLIB_LIBS) \
315+
$(SASL_LIBS)
316+
317+
if OS_WIN32
318+
libmongoc_la_LIBADD += -lws2_32
282319
endif
283320

284321
EXTRA_DIST += $(MONGOC_DEF_FILES) $(NOINST_H_FILES)

tests/Makefile.am

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ TEST_CFLAGS += \
3333
-DCERT_TEST_DIR="\"$(top_srcdir)/tests/x509gen\"" \
3434
-DOS_RELEASE_FILE_DIR="\"$(top_srcdir)/tests/release_files\""
3535

36+
3637
TEST_LIBS = \
3738
$(COVERAGE_LDFLAGS) \
38-
libmongoc-priv.la \
3939
$(PTHREAD_LIBS) \
4040
$(SHM_LIB) \
4141
$(SASL_LIBS) \
@@ -58,7 +58,7 @@ test_load_SOURCES = \
5858
tests/test-load.c \
5959
tests/mongoc-tests.c
6060
test_load_CFLAGS = $(TEST_CFLAGS)
61-
test_load_LDADD = $(TEST_LIBS)
61+
test_load_LDADD = libmongoc-1.0.la $(TEST_LIBS)
6262

6363

6464
if WITH_SNAPPY
@@ -69,7 +69,7 @@ test_secondary_SOURCES = \
6969
tests/test-secondary.c \
7070
tests/mongoc-tests.c
7171
test_secondary_CFLAGS = $(TEST_CFLAGS)
72-
test_secondary_LDADD = $(TEST_LIBS)
72+
test_secondary_LDADD = libmongoc-1.0.la $(TEST_LIBS)
7373

7474
if WITH_SNAPPY
7575
# Use c++ linker
@@ -81,7 +81,7 @@ test_replica_set_SOURCES = \
8181
tests/ha-test.h \
8282
tests/mongoc-tests.c
8383
test_replica_set_CFLAGS = $(TEST_CFLAGS)
84-
test_replica_set_LDADD = $(TEST_LIBS)
84+
test_replica_set_LDADD = libmongoc.la $(TEST_LIBS)
8585

8686

8787
if WITH_SNAPPY
@@ -94,7 +94,16 @@ test_replica_set_ssl_SOURCES = \
9494
tests/ha-test.h \
9595
tests/mongoc-tests.c
9696
test_replica_set_ssl_CFLAGS = $(TEST_CFLAGS)
97-
test_replica_set_ssl_LDADD = $(TEST_LIBS)
97+
test_replica_set_ssl_LDADD = libmongoc-1.0.la $(TEST_LIBS)
98+
99+
test_sharded_cluster_SOURCES = \
100+
tests/test-sharded-cluster.c \
101+
tests/ha-test.c \
102+
tests/ha-test.h \
103+
tests/mongoc-tests.c
104+
test_sharded_cluster_CFLAGS = $(TEST_CFLAGS)
105+
test_sharded_cluster_LDADD = libmongoc-1.0.la $(TEST_LIBS)
106+
98107

99108

100109
test_libmongoc_SOURCES = \
@@ -187,20 +196,15 @@ if WITH_SNAPPY
187196
nodist_EXTRA_test_libmongoc_SOURCES = dummy.cxx
188197
endif
189198
test_libmongoc_CFLAGS = $(TEST_CFLAGS)
190-
test_libmongoc_LDADD = $(TEST_LIBS)
199+
test_libmongoc_LDADD = libmongoc.la $(TEST_LIBS)
200+
test_libmongoc_LDFLAGS = -no-undefined \
201+
-rpath $(libdir)
191202

192203

193204
if WITH_SNAPPY
194205
# Use c++ linker
195206
nodist_EXTRA_test_sharded_cluster_SOURCES = dummy.cxx
196207
endif
197-
test_sharded_cluster_SOURCES = \
198-
tests/test-sharded-cluster.c \
199-
tests/ha-test.c \
200-
tests/ha-test.h \
201-
tests/mongoc-tests.c
202-
test_sharded_cluster_CFLAGS = $(TEST_CFLAGS)
203-
test_sharded_cluster_LDADD = $(TEST_LIBS)
204208

205209
check: test
206210

tests/test-replica-set.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ insert_test_docs (mongoc_collection_t *collection)
3131
mongoc_write_concern_set_w (write_concern, 3);
3232

3333
{
34-
const bson_t *wc;
34+
bson_t wc = BSON_INITIALIZER;
3535
char *str;
3636

37-
wc = _mongoc_write_concern_get_gle (write_concern);
38-
str = bson_as_canonical_json (wc, NULL);
37+
mongoc_write_concern_append (write_concern, &wc);
38+
str = bson_as_canonical_json (&wc, NULL);
3939
fprintf (stderr, "Write Concern: %s\n", str);
4040
bson_free (str);
4141
}

0 commit comments

Comments
 (0)