1 ## Copyright (C) 1996-2022 The Squid Software Foundation and contributors
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.
8 include $(top_srcdir)/src/Common.am
10 ## we need our local files too (but avoid -I. at all costs)
11 AM_CPPFLAGS += -I$(srcdir)
13 SUBDIRS= apparmor helper-mux purge squidclient systemd sysvinit
19 $(top_builddir)/src/ip/libip.la \
20 $(top_builddir)/src/mem/libminimal.la \
21 $(top_builddir)/src/time/libtime.la \
22 $(top_builddir)/lib/libmiscencoding.la \
23 $(top_builddir)/lib/libmiscutil.la \
29 include $(top_srcdir)/doc/manuals/Substitute.am
31 ## Several files need to be shared but we cannot depend on the other
32 ## directories to be built.
33 test_tools.cc: $(top_srcdir)/test-suite/test_tools.cc
34 cp $(top_srcdir)/test-suite/test_tools.cc $@
36 tests/stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc | tests
37 cp $(top_srcdir)/src/tests/stub_debug.cc $@
39 Here.cc: $(top_srcdir)/src/base/Here.cc
40 cp $(top_srcdir)/src/base/Here.cc $@
42 CharacterSet.cc: $(top_srcdir)/src/base/CharacterSet.cc
43 cp $(top_srcdir)/src/base/CharacterSet.cc $@
45 MemBuf.cc: $(top_srcdir)/src/MemBuf.cc
46 cp $(top_srcdir)/src/MemBuf.cc $@
48 tests/stub_cbdata.cc: $(top_srcdir)/src/tests/stub_cbdata.cc | tests
49 cp $(top_srcdir)/src/tests/stub_cbdata.cc $@
51 tests/STUB.h: $(top_srcdir)/src/tests/STUB.h | tests
52 cp $(top_srcdir)/src/tests/STUB.h $@
57 # stock tools for unit tests - library independent versions of dlink_list
59 # globals.cc is needed by test_tools.cc.
60 # Neither of these should be disted from here.
61 TESTSOURCES= test_tools.cc
62 CLEANFILES += test_tools.cc Here.cc CharacterSet.cc MemBuf.cc tests/stub_debug.cc tests/stub_cbdata.cc tests/STUB.h
65 EXTRA_DIST += helper-ok-dying.pl helper-ok.pl
67 ## ##### cachemgr.cgi #####
69 DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
71 libexec_PROGRAMS = cachemgr$(CGIEXT)
73 cachemgr__CGIEXT__SOURCES = \
80 nodist_cachemgr__CGIEXT__SOURCES = \
81 tests/stub_cbdata.cc \
85 cachemgr__CGIEXT__CXXFLAGS = \
87 -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\"
89 EXTRA_DIST += cachemgr.conf cachemgr.cgi.8 cachemgr.cgi.8.in
90 CLEANFILES += cachemgr.cgi.8
91 man_MANS += cachemgr.cgi.8
93 cachemgr.cgi.8: $(srcdir)/cachemgr.cgi.8.in Makefile
94 $(SUBSTITUTE) < $(srcdir)/cachemgr.cgi.8.in > $@
99 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default
100 @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \
101 echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \
103 echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
104 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
108 @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)
109 $(RM) -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default