]> git.ipfire.org Git - thirdparty/squid.git/blob - tools/Makefile.am
Merged from trunk
[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 squidclient
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 $(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 stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc
36 cp $(top_srcdir)/src/tests/stub_debug.cc .
37
38 time.cc: $(top_srcdir)/src/time.cc
39 cp $(top_srcdir)/src/time.cc .
40
41 # stock tools for unit tests - library independent versions of dlink_list
42 # etc.
43 # globals.cc is needed by test_tools.cc.
44 # Neither of these should be disted from here.
45 TESTSOURCES= test_tools.cc
46 CLEANFILES += test_tools.cc stub_debug.cc time.cc
47
48 ## ##### helper-mux #####
49
50 libexec_SCRIPTS = helper-mux.pl
51 EXTRA_DIST += helper-mux.pl helper-mux.README
52
53 ## Test Scripts
54 EXTRA_DIST += helper-ok-dying.pl helper-ok.pl
55
56
57 ## ##### cachemgr.cgi #####
58
59 DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
60
61 libexec_PROGRAMS = cachemgr$(CGIEXT)
62
63 cachemgr__CGIEXT__SOURCES = cachemgr.cc \
64 stub_debug.cc \
65 test_tools.cc \
66 time.cc
67
68 cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS)
69
70 EXTRA_DIST += cachemgr.conf cachemgr.cgi.8 cachemgr.cgi.8.in
71 CLEANFILES += cachemgr.cgi.8
72 man_MANS += cachemgr.cgi.8
73
74 cachemgr.cgi.8: $(srcdir)/cachemgr.cgi.8.in Makefile
75 $(SUBSTITUTE) < $(srcdir)/cachemgr.cgi.8.in > $@
76
77
78
79 ## Shared
80
81 install-data-local:
82 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default
83 @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \
84 echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \
85 else \
86 echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
87 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
88 fi
89
90 uninstall-local:
91 @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)
92 $(RM) -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default