Skip to content

Commit b9a4be5

Browse files
yadijsquid-anubis
authored andcommitted
Maintenance: Remove shared LDADD (#2058)
Most built binaries have a distinct set of dependencies and already have their own foo_LDADD variables. Add a few variables to cover the remaining binaries and stop setting an (incomplete) LDADD global. Also removed unnecessary EXTRA_PROGRAMS because mem_node_test and splay binaries are built unconditionally.
1 parent f35c1dc commit b9a4be5

File tree

2 files changed

+22
-30
lines changed

2 files changed

+22
-30
lines changed

src/Makefile.am

-18
Original file line numberDiff line numberDiff line change
@@ -580,24 +580,6 @@ sysconf_DATA = \
580580
data_DATA = \
581581
mib.txt
582582

583-
LDADD = \
584-
$(AUTH_ACL_LIBS) \
585-
acl/libacls.la \
586-
eui/libeui.la \
587-
acl/libstate.la \
588-
$(AUTH_LIBS) \
589-
acl/libapi.la \
590-
base/libbase.la \
591-
libsquid.la \
592-
ip/libip.la \
593-
fs/libfs.la \
594-
ipc/libipc.la \
595-
mgr/libmgr.la \
596-
$(EPOLL_LIBS) \
597-
$(MINGW_LIBS) \
598-
$(COMPAT_LIB) \
599-
$(XTRA_LIBS)
600-
601583
include $(srcdir)/tests/Stub.am
602584

603585
EXTRA_DIST = \

test-suite/Makefile.am

+22-12
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ include $(top_srcdir)/src/Common.am
1010
## we need our local files too (but avoid -I. at all costs)
1111
AM_CPPFLAGS += -I$(srcdir)
1212

13-
LDADD = \
14-
$(top_builddir)/src/base/libbase.la \
15-
$(top_builddir)/src/globals.o \
16-
$(top_builddir)/src/time/libtime.la \
17-
$(top_builddir)/lib/libmiscutil.la \
18-
$(COMPAT_LIB) \
19-
$(XTRA_LIBS)
20-
21-
EXTRA_PROGRAMS = mem_node_test splay
22-
2313
EXTRA_DIST = \
2414
$(srcdir)/squidconf/* \
2515
test-functionality.sh \
@@ -51,6 +41,7 @@ STUBS = \
5141
stub_SBuf.cc \
5242
stub_tools.cc \
5343
stub_fatal.cc \
44+
stub_libtime.cc \
5445
STUB.h
5546
DEBUG_SOURCE = test_tools.cc $(STUBS)
5647
CLEANFILES += $(STUBS) stub_libmem.cc
@@ -73,6 +64,9 @@ stub_fatal.cc: $(top_srcdir)/src/tests/stub_fatal.cc
7364
stub_libmem.cc: $(top_srcdir)/src/tests/stub_libmem.cc STUB.h
7465
cp $(top_srcdir)/src/tests/stub_libmem.cc $@
7566

67+
stub_libtime.cc: $(top_srcdir)/src/tests/stub_libtime.cc STUB.h
68+
cp $(top_srcdir)/src/tests/stub_libtime.cc $@
69+
7670
STUB.h: $(top_srcdir)/src/tests/STUB.h
7771
cp $(top_srcdir)/src/tests/STUB.h $@
7872

@@ -84,7 +78,10 @@ mem_node_test_LDADD = \
8478
$(top_builddir)/src/mem/libmem.la \
8579
$(top_builddir)/src/debug/libdebug.la \
8680
$(top_builddir)/src/comm/libminimal.la \
87-
$(LDADD)
81+
$(top_builddir)/src/base/libbase.la \
82+
$(top_builddir)/lib/libmiscutil.la \
83+
$(COMPAT_LIB) \
84+
$(XTRA_LIBS)
8885

8986
mem_hdr_test_SOURCES = \
9087
$(DEBUG_SOURCE) \
@@ -95,22 +92,35 @@ mem_hdr_test_LDADD = \
9592
$(top_builddir)/src/mem/libmem.la \
9693
$(top_builddir)/src/debug/libdebug.la \
9794
$(top_builddir)/src/comm/libminimal.la \
98-
$(LDADD)
95+
$(top_builddir)/src/base/libbase.la \
96+
$(top_builddir)/lib/libmiscutil.la \
97+
$(COMPAT_LIB) \
98+
$(XTRA_LIBS)
9999

100100
splay_SOURCES = \
101101
$(DEBUG_SOURCE) \
102102
splay.cc \
103103
stub_libmem.cc
104+
splay_LDADD = \
105+
$(top_builddir)/lib/libmiscutil.la \
106+
$(COMPAT_LIB) \
107+
$(XTRA_LIBS)
104108

105109
syntheticoperators_SOURCES = \
106110
$(DEBUG_SOURCE) \
107111
stub_libmem.cc \
108112
syntheticoperators.cc
113+
syntheticoperators_LDADD = \
114+
$(COMPAT_LIB) \
115+
$(XTRA_LIBS)
109116

110117
VirtualDeleteOperator_SOURCES = \
111118
$(DEBUG_SOURCE) \
112119
VirtualDeleteOperator.cc \
113120
stub_libmem.cc
121+
VirtualDeleteOperator_LDADD = \
122+
$(COMPAT_LIB) \
123+
$(XTRA_LIBS)
114124

115125
installcheck-local: squid-conf-tests
116126

0 commit comments

Comments
 (0)