]> git.ipfire.org Git - thirdparty/squid.git/blob - tools/Makefile.am
Merged from trunk (r12858).
[thirdparty/squid.git] / tools / Makefile.am
1 #
2 # Makefile for the Squid Object Cache server
3 #
4 # Uncomment and customize the following to suit your needs:
5 #
6
7 include $(top_srcdir)/src/Common.am
8
9 AUTOMAKE_OPTIONS = subdir-objects
10
11 ## we need our local files too (but avoid -I. at all costs)
12 INCLUDES += -I$(srcdir)
13
14 SUBDIRS = purge
15 EXTRA_DIST =
16 man_MANS =
17 DISTCLEANFILES =
18
19 LDADD = \
20 $(top_builddir)/src/ip/libip.la \
21 $(top_builddir)/lib/libmiscencoding.la \
22 $(top_builddir)/lib/libmiscutil.la \
23 $(COMPAT_LIB) \
24 $(KRB5LIBS) \
25 $(XTRA_LIBS)
26
27 include $(top_srcdir)/doc/manuals/Substitute.am
28
29 ## Several files need to be shared but we cannot depend on the other
30 ## directories to be built.
31 test_tools.cc: $(top_srcdir)/test-suite/test_tools.cc
32 cp $(top_srcdir)/test-suite/test_tools.cc .
33
34 stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc
35 cp $(top_srcdir)/src/tests/stub_debug.cc .
36
37 stub_fd.cc: $(top_srcdir)/src/tests/stub_fd.cc
38 cp $(top_srcdir)/src/tests/stub_fd.cc .
39
40 time.cc: $(top_srcdir)/src/time.cc
41 cp $(top_srcdir)/src/time.cc .
42
43 # stock tools for unit tests - library independent versions of dlink_list
44 # etc.
45 # globals.cc is needed by test_tools.cc.
46 # Neither of these should be disted from here.
47 TESTSOURCES= test_tools.cc
48 CLEANFILES += test_tools.cc stub_debug.cc stub_fd.cc time.cc
49
50 ## ##### helper-mux #####
51
52 libexec_SCRIPTS = helper-mux.pl
53 EXTRA_DIST += helper-mux.pl helper-mux.README
54
55 ## Test Scripts
56 EXTRA_DIST += helper-ok-dying.pl helper-ok.pl
57
58 ## ##### squidclient #####
59
60 bin_PROGRAMS = squidclient
61
62 squidclient_SOURCES = squidclient.cc \
63 stub_debug.cc \
64 stub_fd.cc \
65 test_tools.cc \
66 time.cc
67
68 EXTRA_DIST += squidclient.1
69 man_MANS += squidclient.1
70
71
72
73 ## ##### cachemgr.cgi #####
74
75 DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
76
77 libexec_PROGRAMS = cachemgr$(CGIEXT)
78
79 cachemgr__CGIEXT__SOURCES = cachemgr.cc \
80 stub_debug.cc \
81 test_tools.cc \
82 time.cc
83
84 cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS)
85
86 EXTRA_DIST += cachemgr.conf cachemgr.cgi.8 cachemgr.cgi.8.in
87 CLEANFILES += cachemgr.cgi.8
88 man_MANS += cachemgr.cgi.8
89
90 cachemgr.cgi.8: $(srcdir)/cachemgr.cgi.8.in Makefile
91 $(SUBSTITUTE) < $(srcdir)/cachemgr.cgi.8.in > $@
92
93
94
95 ## Shared
96
97 install-data-local:
98 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default
99 @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \
100 echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \
101 else \
102 echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
103 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
104 fi
105
106 uninstall-local:
107 @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)
108 $(RM) -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default