]> git.ipfire.org Git - thirdparty/squid.git/blob - tools/Makefile.am
SourceLayout: Move time related tools to time/libtime.la (#1001)
[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)/src/time/libtime.la \
22 $(top_builddir)/lib/libmiscencoding.la \
23 $(top_builddir)/lib/libmiscutil.la \
24 $(COMPAT_LIB) \
25 $(NETTLELIB) \
26 $(KRB5LIBS) \
27 $(XTRA_LIBS)
28
29 include $(top_srcdir)/doc/manuals/Substitute.am
30
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 $@
35
36 tests/stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc | tests
37 cp $(top_srcdir)/src/tests/stub_debug.cc $@
38
39 Here.cc: $(top_srcdir)/src/base/Here.cc
40 cp $(top_srcdir)/src/base/Here.cc $@
41
42 CharacterSet.cc: $(top_srcdir)/src/base/CharacterSet.cc
43 cp $(top_srcdir)/src/base/CharacterSet.cc $@
44
45 MemBuf.cc: $(top_srcdir)/src/MemBuf.cc
46 cp $(top_srcdir)/src/MemBuf.cc $@
47
48 tests/stub_cbdata.cc: $(top_srcdir)/src/tests/stub_cbdata.cc | tests
49 cp $(top_srcdir)/src/tests/stub_cbdata.cc $@
50
51 tests/STUB.h: $(top_srcdir)/src/tests/STUB.h | tests
52 cp $(top_srcdir)/src/tests/STUB.h $@
53
54 tests:
55 mkdir -p $@
56
57 # stock tools for unit tests - library independent versions of dlink_list
58 # etc.
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
63
64 ## Test Scripts
65 EXTRA_DIST += helper-ok-dying.pl helper-ok.pl
66
67 ## ##### cachemgr.cgi #####
68
69 DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
70
71 libexec_PROGRAMS = cachemgr$(CGIEXT)
72
73 cachemgr__CGIEXT__SOURCES = \
74 CharacterSet.cc \
75 Here.cc \
76 MemBuf.cc \
77 cachemgr.cc \
78 test_tools.cc
79
80 nodist_cachemgr__CGIEXT__SOURCES = \
81 tests/stub_cbdata.cc \
82 tests/stub_debug.cc \
83 tests/STUB.h
84
85 cachemgr__CGIEXT__CXXFLAGS = \
86 $(AM_CXXFLAGS) \
87 -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\"
88
89 EXTRA_DIST += cachemgr.conf cachemgr.cgi.8 cachemgr.cgi.8.in
90 CLEANFILES += cachemgr.cgi.8
91 man_MANS += cachemgr.cgi.8
92
93 cachemgr.cgi.8: $(srcdir)/cachemgr.cgi.8.in Makefile
94 $(SUBSTITUTE) < $(srcdir)/cachemgr.cgi.8.in > $@
95
96 ## Shared
97
98 install-data-local:
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)" ; \
102 else \
103 echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
104 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
105 fi
106
107 uninstall-local:
108 @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)
109 $(RM) -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default