From: hno <> Date: Thu, 11 May 2006 07:36:57 +0000 (+0000) Subject: Move squidclient and cachemgr from src to tools X-Git-Tag: SQUID_3_0_PRE4~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94ab55b0a3d5d988aa7572c6df98d7ce66626ea0;p=thirdparty%2Fsquid.git Move squidclient and cachemgr from src to tools --- diff --git a/Makefile.am b/Makefile.am index 97325baf54..b3290881a1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,11 @@ ## Process this file with automake to produce Makefile.in # -# $Id: Makefile.am,v 1.26 2006/04/17 12:00:35 robertc Exp $ +# $Id: Makefile.am,v 1.27 2006/05/11 01:36:57 hno Exp $ # AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 foreign -DIST_SUBDIRS = lib snmplib scripts src icons errors contrib doc helpers test-suite -SUBDIRS = lib @makesnmplib@ scripts src icons errors doc helpers test-suite +DIST_SUBDIRS = lib snmplib scripts src icons errors contrib doc helpers test-suite tools +SUBDIRS = lib @makesnmplib@ scripts src icons errors doc helpers test-suite tools DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]* DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'` diff --git a/configure.in b/configure.in index 40150cccee..66ceb27ec1 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.410 2006/05/07 14:04:39 serassio Exp $ +dnl $Id: configure.in,v 1.411 2006/05/11 01:36:57 hno Exp $ dnl dnl dnl @@ -13,7 +13,7 @@ AC_CONFIG_SRCDIR([src/main.cc]) AC_CONFIG_AUX_DIR(cfgaux) AM_INIT_AUTOMAKE([tar-ustar]) AM_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.410 $)dnl +AC_REVISION($Revision: 1.411 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -3126,7 +3126,8 @@ AC_CONFIG_FILES([\ helpers/external_acl/session/Makefile \ helpers/external_acl/unix_group/Makefile \ helpers/external_acl/wbinfo_group/Makefile \ - helpers/external_acl/mswin_lm_group/Makefile + helpers/external_acl/mswin_lm_group/Makefile \ + tools/Makefile ]) AC_CONFIG_SUBDIRS(lib/libTrie) diff --git a/src/Makefile.am b/src/Makefile.am index 61519a42f3..6c1c64e07d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.143 2006/05/10 22:56:59 hno Exp $ +# $Id: Makefile.am,v 1.144 2006/05/11 01:36:57 hno Exp $ # # Uncomment and customize the following to suit your needs: # @@ -190,24 +190,19 @@ noinst_PROGRAMS = \ sbin_PROGRAMS = \ squid -bin_PROGRAMS = \ - squidclient +bin_PROGRAMS = libexec_PROGRAMS = \ $(PINGER) \ $(DNSSERVER) \ @DISK_PROGRAMS@ \ - $(UNLINKD) \ - cachemgr$(CGIEXT) + $(UNLINKD) cf_gen_SOURCES = cf_gen.cc defines.h debug.cc time.cc nodist_cf_gen_SOURCES = globals.cc nodist_cf_gen_HEADER = cf_gen_defines.h cf_gen.$(OBJEXT): cf_gen_defines.h -squidclient_SOURCES = client.cc -cachemgr__CGIEXT__SOURCES = cachemgr.cc -cachemgr__CGIEXT__CFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CFLAGS) all_FSMODULES = \ fs/aufs/StoreFSaufs.cc \ @@ -865,7 +860,6 @@ EXTRA_DIST = \ mk-string-arrays.awk \ repl_modules.sh \ mib.txt \ - cachemgr.conf \ mime.conf.default libAIO_a_SOURCES = \ @@ -909,7 +903,6 @@ DEFAULT_HTTP_PORT = @CACHE_HTTP_PORT@ DEFAULT_ICP_PORT = @CACHE_ICP_PORT@ DEFAULT_PREFIX = $(prefix) DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf -DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'` DEFAULT_LOG_PREFIX = $(localstatedir)/logs @@ -997,12 +990,6 @@ install-data-local: install-sysconfDATA install-dataDATA echo "$(INSTALL_DATA) squid.conf.default $(DESTDIR)$(DEFAULT_CONFIG_FILE)"; \ $(INSTALL_DATA) squid.conf.default $(DESTDIR)$(DEFAULT_CONFIG_FILE); \ fi - @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \ - echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \ - else \ - echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \ - $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \ - fi $(mkinstalldirs) $(DESTDIR)$(DEFAULT_LOG_PREFIX) uninstall-local: diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 0000000000..0f0c2b27fc --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1,56 @@ +# +# Makefile for the Squid Object Cache server +# +# $Id: Makefile.am,v 1.1 2006/05/11 01:36:57 hno Exp $ +# +# Uncomment and customize the following to suit your needs: +# + + +AUTOMAKE_OPTIONS = subdir-objects + +INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/lib/libTrie/include +INCLUDES += @SQUID_CPPUNIT_INC@ + +TESTS=$(check_PROGRAMS) +check_PROGRAMS= + +SUBDIRS = + +bin_PROGRAMS = \ + squidclient + +libexec_PROGRAMS = \ + cachemgr$(CGIEXT) + +squidclient_SOURCES = squidclient.cc +cachemgr__CGIEXT__SOURCES = cachemgr.cc +cachemgr__CGIEXT__CFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CFLAGS) + +LDADD = -L../lib -lmiscutil $(XTRA_LIBS) + +EXTRA_DIST = \ + cachemgr.conf + +DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf + +$(OBJS): $(top_srcdir)/include/version.h ../include/autoconf.h + +install-data-local: install-sysconfDATA install-dataDATA + @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \ + echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \ + else \ + echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \ + $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \ + fi + +uninstall-local: + +# Don't automatically uninstall config files +# @if test -f $(DESTDIR)$(DEFAULT_CONFIG_FILE) ; then \ +# echo "rm -f $(DESTDIR)$(DEFAULT_CONFIG_FILE)"; \ +# $(RM) -f $(DESTDIR)$(DEFAULT_CONFIG_FILE); \ +# fi + +DISTCLEANFILES = + diff --git a/src/cachemgr.cc b/tools/cachemgr.cc similarity index 99% rename from src/cachemgr.cc rename to tools/cachemgr.cc index 836d7aa0f5..ebe73803b5 100644 --- a/src/cachemgr.cc +++ b/tools/cachemgr.cc @@ -1,6 +1,6 @@ /* - * $Id: cachemgr.cc,v 1.114 2006/05/10 22:03:07 hno Exp $ + * $Id: cachemgr.cc,v 1.1 2006/05/11 01:36:57 hno Exp $ * * DEBUG: section 0 CGI Cache Manager * AUTHOR: Duane Wessels diff --git a/src/cachemgr.conf b/tools/cachemgr.conf similarity index 100% rename from src/cachemgr.conf rename to tools/cachemgr.conf diff --git a/src/client.cc b/tools/squidclient.cc similarity index 97% rename from src/client.cc rename to tools/squidclient.cc index 2fdcb2a1ef..75dce1c936 100644 --- a/src/client.cc +++ b/tools/squidclient.cc @@ -1,6 +1,6 @@ /* - * $Id: client.cc,v 1.109 2005/05/26 09:44:30 hno Exp $ + * $Id: squidclient.cc,v 1.1 2006/05/11 01:36:57 hno Exp $ * * DEBUG: section 0 WWW Client * AUTHOR: Harvest Derived @@ -33,12 +33,28 @@ * */ -#include "squid.h" +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "util.h" #ifndef BUFSIZ #define BUFSIZ 8192 #endif +typedef void SIGHDLR(int sig); + /* Local functions */ static int client_comm_bind(int, const char *);