]> git.ipfire.org Git - thirdparty/squid.git/blob - tools/Makefile.am
mem/libminimal.la to facilitate helper reuse of convenience libs (#1004)
[thirdparty/squid.git] / tools / Makefile.am
1 ## Copyright (C) 1996-2022 The Squid Software Foundation and contributors
2 ##
3 ## Squid software is distributed under GPLv2+ license and includes
4 ## contributions from numerous individuals and organizations.
5 ## Please see the COPYING and CONTRIBUTORS files for details.
6 ##
7
8 include $(top_srcdir)/src/Common.am
9
10 ## we need our local files too (but avoid -I. at all costs)
11 AM_CPPFLAGS += -I$(srcdir)
12
13 SUBDIRS= apparmor helper-mux purge squidclient systemd sysvinit
14 EXTRA_DIST=
15 man_MANS=
16 DISTCLEANFILES=
17
18 LDADD= \
19 $(top_builddir)/src/ip/libip.la \
20 $(top_builddir)/src/mem/libminimal.la \
21 $(top_builddir)/lib/libmiscencoding.la \
22 $(top_builddir)/lib/libmiscutil.la \
23 $(COMPAT_LIB) \
24 $(NETTLELIB) \
25 $(KRB5LIBS) \
26 $(XTRA_LIBS)
27
28 include $(top_srcdir)/doc/manuals/Substitute.am
29
30 ## Several files need to be shared but we cannot depend on the other
31 ## directories to be built.
32 test_tools.cc: $(top_srcdir)/test-suite/test_tools.cc
33 cp $(top_srcdir)/test-suite/test_tools.cc $@
34
35 tests/stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc | tests
36 cp $(top_srcdir)/src/tests/stub_debug.cc $@
37
38 Here.cc: $(top_srcdir)/src/base/Here.cc
39 cp $(top_srcdir)/src/base/Here.cc $@
40
41 CharacterSet.cc: $(top_srcdir)/src/base/CharacterSet.cc
42 cp $(top_srcdir)/src/base/CharacterSet.cc $@
43
44 MemBuf.cc: $(top_srcdir)/src/MemBuf.cc
45 cp $(top_srcdir)/src/MemBuf.cc $@
46
47 time.cc: $(top_srcdir)/src/time.cc
48 cp $(top_srcdir)/src/time.cc $@
49
50 tests/stub_cbdata.cc: $(top_srcdir)/src/tests/stub_cbdata.cc | tests
51 cp $(top_srcdir)/src/tests/stub_cbdata.cc $@
52
53 tests/STUB.h: $(top_srcdir)/src/tests/STUB.h | tests
54 cp $(top_srcdir)/src/tests/STUB.h $@
55
56 tests:
57 mkdir -p $@
58
59 # stock tools for unit tests - library independent versions of dlink_list
60 # etc.
61 # globals.cc is needed by test_tools.cc.
62 # Neither of these should be disted from here.
63 TESTSOURCES= test_tools.cc
64 CLEANFILES += test_tools.cc Here.cc CharacterSet.cc MemBuf.cc tests/stub_debug.cc time.cc tests/stub_cbdata.cc tests/STUB.h
65
66 ## Test Scripts
67 EXTRA_DIST += helper-ok-dying.pl helper-ok.pl
68
69 ## ##### cachemgr.cgi #####
70
71 DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
72
73 libexec_PROGRAMS = cachemgr$(CGIEXT)
74
75 cachemgr__CGIEXT__SOURCES = \
76 CharacterSet.cc \
77 Here.cc \
78 MemBuf.cc \
79 cachemgr.cc \
80 test_tools.cc \
81 time.cc
82
83 nodist_cachemgr__CGIEXT__SOURCES = \
84 tests/stub_cbdata.cc \
85 tests/stub_debug.cc \
86 tests/STUB.h
87
88 cachemgr__CGIEXT__CXXFLAGS = \
89 $(AM_CXXFLAGS) \
90 -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\"
91
92 EXTRA_DIST += cachemgr.conf cachemgr.cgi.8 cachemgr.cgi.8.in
93 CLEANFILES += cachemgr.cgi.8
94 man_MANS += cachemgr.cgi.8
95
96 cachemgr.cgi.8: $(srcdir)/cachemgr.cgi.8.in Makefile
97 $(SUBSTITUTE) < $(srcdir)/cachemgr.cgi.8.in > $@
98
99 ## Shared
100
101 install-data-local:
102 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default
103 @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \
104 echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \
105 else \
106 echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
107 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
108 fi
109
110 uninstall-local:
111 @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)
112 $(RM) -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default