AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 foreign
DIST_SUBDIRS = compat lib snmplib scripts src icons errors contrib doc helpers test-suite tools
-SUBDIRS = compat lib @makesnmplib@ scripts src/ip src icons errors doc helpers test-suite tools
+SUBDIRS = compat 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)/'`
scripts/RunCache \
scripts/RunAccel \
src/Makefile \
+ src/base/Makefile \
src/fs/Makefile \
src/repl/Makefile \
src/auth/Makefile \
#ifndef SQUID_ASYNCJOBCALLS_H
#define SQUID_ASYNCJOBCALLS_H
-#include "ICAP/AsyncJob.h"
+#include "base/AsyncJob.h"
/*
* *MemFunT are member function (i.e., class method) wrappers. They store
#include "MemBuf.h"
#include "AsyncCall.h"
-#include "ICAP/AsyncJob.h"
+#include "base/AsyncJob.h"
class BodyPipe;
--- /dev/null
+## Settings common to many Squid Makefiles
+
+## This file should be included first in all src/subdir/Makefile.am
+## so it must not contain stuff specific to or bad for some subdirectories.
+
+## TODO: make this set by configure?
+AM_CFLAGS = @SQUID_CFLAGS@
+AM_CXXFLAGS = @SQUID_CXXFLAGS@
+DEFS = @DEFS@
+
+## so that others can always use += for these variables
+CLEANFILES =
+check_PROGRAMS =
+TESTS =
+
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/include \
+ @SQUID_CPPUNIT_INC@
+
+## make all compiled sources depend on generated files
+## XXX: Do we really need this? Does auto-dependency tracking work?
+$(OBJS): $(top_srcdir)/include/version.h $(top_builddir)/include/autoconf.h
TESTS=$(check_PROGRAMS)
check_PROGRAMS=
-SUBDIRS = fs repl auth icmp ip
+SUBDIRS = base fs repl auth ip icmp
if USE_ADAPTATION
SUBDIRS += adaptation
noinst_LIBRARIES = @DISK_LIBS@
noinst_LTLIBRARIES = libsquid.la libauth.la
+# libraries used by many targets
+COMMON_LIBS = \
+ libsquid.la \
+ libauth.la \
+ base/libbase.la \
+ ip/libip.la
+
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
@DISK_PROGRAMS@ \
$(UNLINKD)
-cf_gen_SOURCES = \
- cf_gen.cc \
- defines.h \
- debug.cc \
- time.cc
-
-nodist_cf_gen_SOURCES = globals.cc
+cf_gen_SOURCES = cf_gen.cc
nodist_cf_gen_HEADER = cf_gen_defines.h
cf_gen_LDADD= \
- libsquid.la \
- libauth.la \
- ip/libip.la \
+ ../compat/libcompat.la \
-L../lib -lmiscutil \
@XTRA_LIBS@ \
@EPOLL_LIBS@ \
CommCalls.h \
DescriptorSet.cc \
DescriptorSet.h \
- ICAP/AsyncJob.cc \
- ICAP/AsyncJob.h \
SquidConfig.cc \
TextException.cc \
TextException.h
string_arrays.c
squid_LDADD = \
- libsquid.la \
- libauth.la \
+ $(COMMON_LIBS) \
icmp/libicmp.la icmp/libicmp-core.la \
- ip/libip.la \
-L../lib \
@XTRA_OBJS@ \
@DISK_LINKOBJS@ \
wordlist.cc \
$(WIN32_SOURCE)
ufsdump_LDADD = \
- libsquid.la \
- libauth.la \
+ $(COMMON_LIBS) \
icmp/libicmp.la icmp/libicmp-core.la \
- ip/libip.la \
@XTRA_OBJS@ \
@REPL_OBJS@ \
@STORE_OBJS@ \
data_DATA = \
mib.txt
-LDADD = libsquid.la libauth.la ip/libip.la -L../lib -lmiscutil @XTRA_LIBS@ @EPOLL_LIBS@ @MINGW_LIBS@
+LDADD = $(COMMON_LIBS) -L../lib -lmiscutil @XTRA_LIBS@ @EPOLL_LIBS@ @MINGW_LIBS@
EXTRA_DIST = \
cf_gen_defines \
$(TESTSOURCES)
tests_testAuth_LDADD= \
- libsquid.la \
- libauth.la \
- ip/libip.la \
+ $(COMMON_LIBS) \
@AUTH_LINKOBJS@ @AUTH_OBJS@ \
-L../lib -lmiscutil \
@REGEXLIB@ \
nodist_tests_testACLMaxUserIP_SOURCES= \
$(TESTSOURCES)
tests_testACLMaxUserIP_LDADD= \
- libsquid.la \
- libauth.la \
- ip/libip.la \
+ $(COMMON_LIBS) \
-L../lib -lmiscutil \
@REGEXLIB@ \
@SQUID_CPPUNIT_LIBS@ \
repl_modules.cc \
string_arrays.c
tests_testCacheManager_LDADD = \
- libsquid.la \
- libauth.la \
+ $(COMMON_LIBS) \
icmp/libicmp.la icmp/libicmp-core.la \
- ip/libip.la \
@REPL_OBJS@ \
${ADAPTATION_LIBS} \
@REGEXLIB@ \
nodist_tests_testDiskIO_SOURCES= \
$(SWAP_TEST_GEN_SOURCES)
tests_testDiskIO_LDADD = \
- ip/libip.la \
- libsquid.la \
+ $(COMMON_LIBS) \
@DISK_LIBS@ \
$(SWAP_TEST_LDADD) \
SquidConfig.o
repl_modules.cc \
string_arrays.c
tests_testEvent_LDADD = \
- libsquid.la \
- libauth.la \
+ $(COMMON_LIBS) \
icmp/libicmp.la icmp/libicmp-core.la \
- ip/libip.la \
@REPL_OBJS@ \
${ADAPTATION_LIBS} \
@REGEXLIB@ \
repl_modules.cc \
string_arrays.c
tests_testEventLoop_LDADD = \
- libsquid.la \
- libauth.la \
+ $(COMMON_LIBS) \
icmp/libicmp.la icmp/libicmp-core.la \
- ip/libip.la \
@REPL_OBJS@ \
${ADAPTATION_LIBS} \
@REGEXLIB@ \
repl_modules.cc \
string_arrays.c
tests_test_http_range_LDADD = \
- libsquid.la \
- libauth.la \
+ $(COMMON_LIBS) \
icmp/libicmp.la icmp/libicmp-core.la \
- ip/libip.la \
@REPL_OBJS@ \
@STORE_OBJS@ \
${ADAPTATION_LIBS} \
repl_modules.cc \
string_arrays.c
tests_testHttpRequest_LDADD = \
- libsquid.la \
- libauth.la \
+ $(COMMON_LIBS) \
icmp/libicmp.la icmp/libicmp-core.la \
- ip/libip.la \
@REPL_OBJS@ \
${ADAPTATION_LIBS} \
@REGEXLIB@ \
$(STORE_TEST_GEN_SOURCES)
tests_testStore_LDADD= \
- libsquid.la \
- libauth.la \
- ip/libip.la \
+ $(COMMON_LIBS) \
-L../lib -lmiscutil \
@REGEXLIB@ \
@SQUID_CPPUNIT_LIBS@ \
nodist_tests_testString_SOURCES = \
$(TESTSOURCES)
tests_testString_LDADD = \
- libsquid.la \
- ip/libip.la \
+ $(COMMON_LIBS) \
-L../lib -lmiscutil \
@REGEXLIB@ \
@SQUID_CPPUNIT_LIBS@ \
$(DISKIO_GEN_SOURCE)
SWAP_TEST_LDADD = \
- libauth.la \
@REGEXLIB@ \
@STORE_LINKOBJS@ \
@STORE_OBJS@ \
nodist_tests_testUfs_SOURCES = \
$(SWAP_TEST_GEN_SOURCES)
tests_testUfs_LDADD = \
- libsquid.la \
- ip/libip.la \
+ $(COMMON_LIBS) \
$(SWAP_TEST_LDADD) \
@SSLLIB@
tests_testUfs_LDFLAGS = $(LIBADD_DL)
repl_modules.cc \
string_arrays.c
tests_testURL_LDADD = \
- libsquid.la \
- libauth.la \
+ $(COMMON_LIBS) \
icmp/libicmp.la icmp/libicmp-core.la \
- ip/libip.la \
@REGEXLIB@ \
@REPL_OBJS@ \
${ADAPTATION_LIBS} \
#include "StoreIOBuffer.h"
#include "forward.h"
#include "BodyPipe.h"
-#include "ICAP/AsyncJob.h"
+#include "base/AsyncJob.h"
#include "CommCalls.h"
#if USE_ADAPTATION
--- /dev/null
+## Test ./*.h files in a directory using test-suite/testheaders.sh
+
+## TODO: include in src/Common.am when all testHeaders users are the same.
+
+TESTS += testHeaders
+
+## .h dependency test script
+## aborts build process on errors; XXX: even with "make -k"
+testHeaders: $(srcdir)/*.h
+ $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(srcdir)" || exit 1
+
+.PHONY: testHeaders
#ifndef SQUID_ADAPTATION__ACCESS_CHECK_H
#define SQUID_ADAPTATION__ACCESS_CHECK_H
-#include "ICAP/AsyncJob.h"
+#include "base/AsyncJob.h"
#include "adaptation/Elements.h"
#include "adaptation/forward.h"
#define SQUID_ADAPTATION__INITIATE_H
#include "AsyncCall.h"
-#include "ICAP/AsyncJob.h"
+#include "base/AsyncJob.h"
#include "adaptation/forward.h"
class HttpMsg;
#ifndef SQUID_ADAPTATION__INITIATOR_H
#define SQUID_ADAPTATION__INITIATOR_H
-#include "ICAP/AsyncJob.h"
+#include "base/AsyncJob.h"
#include "adaptation/forward.h"
/*
#ifndef SQUID_ASYNC_JOB_H
#define SQUID_ASYNC_JOB_H
-/// \todo move src/ICAP/AsyncJob.* to src/
-
-
#include "AsyncCall.h"
#include "TextException.h"
--- /dev/null
+
+include $(top_srcdir)/src/Common.am
+include $(top_srcdir)/src/TestHeaders.am
+
+noinst_LTLIBRARIES = libbase.la
+
+libbase_la_SOURCES = \
+ AsyncJob.h \
+ AsyncJob.cc
#include "StoreIOBuffer.h"
#include "BodyPipe.h"
#include "RefCount.h"
-#include "ICAP/AsyncJob.h"
+#include "base/AsyncJob.h"
#include "CommCalls.h"
class ConnStateData;
#include "client_side.h"
#include "AccessLogEntry.h"
#include "dlink.h"
-#include "ICAP/AsyncJob.h"
+#include "base/AsyncJob.h"
#if USE_ADAPTATION
#include "adaptation/forward.h"