]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Detach automke system from using -I.
authorAmos Jeffries <amosjeffries@squid-cache.org>
Thu, 23 Apr 2009 09:52:10 +0000 (03:52 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Thu, 23 Apr 2009 09:52:10 +0000 (03:52 -0600)
That path include allows unsafe header collisions on case-insensitive
file systems.

Uses src/Common.am in all makefiles now to provide build paths and flags
correctly to all parts of Squid.

TODO:
  fix several code warnings now present due to CFLAGS being used
  on some helper code which had omitted to use them previously.

  check that libTrie and squid_kerb_auth are not affected as well.

33 files changed:
compat/Makefile.am
configure.in
helpers/basic_auth/LDAP/Makefile.am
helpers/basic_auth/MSNT/Makefile.am
helpers/basic_auth/NCSA/Makefile.am
helpers/basic_auth/PAM/Makefile.am
helpers/basic_auth/SASL/Makefile.am
helpers/basic_auth/SMB/Makefile.am
helpers/basic_auth/YP/Makefile.am
helpers/basic_auth/getpwnam/Makefile.am
helpers/basic_auth/mswin_sspi/Makefile.am
helpers/basic_auth/squid_radius_auth/Makefile.am
helpers/digest_auth/eDirectory/Makefile.am
helpers/digest_auth/ldap/Makefile.am
helpers/digest_auth/password/Makefile.am
helpers/external_acl/ip_user/Makefile.am
helpers/external_acl/ldap_group/Makefile.am
helpers/external_acl/session/Makefile.am
helpers/external_acl/unix_group/Makefile.am
helpers/negotiate_auth/mswin_sspi/Makefile.am
helpers/ntlm_auth/fakeauth/Makefile.am
helpers/ntlm_auth/mswin_sspi/Makefile.am
helpers/ntlm_auth/smb_lm/Makefile.am
helpers/ntlm_auth/smb_lm/smbval/Makefile.am
lib/tests/testRFC1035.cc
src/Makefile.am
src/auth/Makefile.am
src/fs/Makefile.am
src/icmp/Makefile.am
src/ip/Makefile.am
src/repl/Makefile.am
test-suite/Makefile.am
tools/Makefile.am

index 80ed9929a31311efa0f6ab76f8d8a03e3b69486e..4e0eac8ba59353624c22641222bbdf820d08e85a 100644 (file)
@@ -13,6 +13,7 @@ INCLUDES = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/src \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_builddir)/lib \
        @SQUID_CPPUNIT_INC@
 
index bb0ae5ba51dc238df98b5bdf4fc4b61cdf38fc4d..e291df894f2a27c2b3c6e80be115de5a3085326f 100644 (file)
@@ -9,7 +9,7 @@ AC_PREREQ(2.52)
 AM_CONFIG_HEADER(include/autoconf.h)
 AC_CONFIG_AUX_DIR(cfgaux)
 AC_CONFIG_SRCDIR([src/main.cc])
-AM_INIT_AUTOMAKE([tar-ustar])
+AM_INIT_AUTOMAKE([tar-ustar nostdinc])
 AC_REVISION($Revision: 1.497 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
index 5c5d19ab6770dc5a84fa6f0b4f009843c9c1d806..11af8a29afa58d52ba3223c650ad9fa2fee4ef94 100644 (file)
@@ -6,6 +6,8 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
 libexec_PROGRAMS       = squid_ldap_auth
 man_MANS               = squid_ldap_auth.8
 EXTRA_DIST             = squid_ldap_auth.8
@@ -18,6 +20,5 @@ LDADD = \
        $(LIB_LBER) \
        $(XTRA_LIBS)
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/include
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
index 1deb9b56acc89f960b4cf8b83134b016b036ea30..c8d790163886985a2d3dd3f58d58dea908216200 100644 (file)
@@ -6,6 +6,8 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
 MSNTAUTH_CONF = $(sysconfdir)/msntauth.conf
 
 libexec_PROGRAMS = msnt_auth
@@ -30,10 +32,8 @@ sysconf_DATA = \
 
 LDADD = -L$(top_builddir)/lib -lmiscutil $(XTRA_LIBS) $(top_builddir)/compat/libcompat.la
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 confload.o: confload.c
        $(COMPILE) -DSYSCONFDIR=\"$(sysconfdir)\" -c $(srcdir)/confload.c -o $@
index 5d0cc2de7b0f472649879c9c6c86cfce1e23f300..08ef3d72de6f9ea3a3a8879449ec79d6a49327ee 100644 (file)
@@ -6,6 +6,8 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
 libexec_PROGRAMS       = ncsa_auth
 ncsa_auth_SOURCES      = ncsa_auth.c crypt_md5.c crypt_md5.h
 man_MANS               = ncsa_auth.8
@@ -17,7 +19,5 @@ LDADD = \
        $(XTRA_LIBS) \
        $(SSLLIB)
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
index b33262002ec476f8173c35ebbbbb7c38ca0a2476..c6a65aec56aa88d25b2eae0a54f8904396375d96 100644 (file)
@@ -6,13 +6,14 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
 man_MANS               = pam_auth.8
 EXTRA_DIST             = pam_auth.8
 libexec_PROGRAMS       = pam_auth
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/include
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
index b2bed770e36defaf6d7afb738b4e8a55cceeecd7..d30bf67182eca81aa61291f75fb691922866a44a 100644 (file)
@@ -6,11 +6,12 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
 libexec_PROGRAMS       = sasl_auth
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/include
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
index 89eabe400c530a1be77a666031f640e23508369b..82aa4b42ea23ddfc8a3bb3995933ab9c2955cde2 100644 (file)
@@ -6,6 +6,8 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
 # SAMBAPREFIX must point to the directory where Samba has been installed.
 # By default, Samba is installed in /usr/local/samba. If you changed this
 # by using the --prefix option when configuring Samba, you need to change
@@ -22,9 +24,8 @@ libexec_PROGRAMS = smb_auth
 smb_auth_CFLAGS = -DSAMBAPREFIX=\"$(SAMBAPREFIX)\" -DHELPERSCRIPT=\"$(SMB_AUTH_HELPER_PATH)\"
 EXTRA_DIST = smb_auth.sh COPYING-2.0
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/include
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
index 37b111ba2d81fb68cb83f0ef75f3fe71a357d2a7..79f5561a69efc548aa921b2b393951f028a0a084 100644 (file)
@@ -5,12 +5,13 @@
 #
 #
 
+include $(top_srcdir)/src/Common.am
+
 libexec_PROGRAMS = yp_auth
 yp_auth_SOURCES        = yp_auth.c nis_support.h nis_support.c
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/include
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
index 4685071f067c214a6b2265f612b0715e303ab962..c733abd628de1adbaff11e63d6325c7f2a5cd304 100644 (file)
@@ -6,15 +6,14 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
 
 libexec_PROGRAMS = getpwname_auth
 
 getpwname_auth_SOURCES = getpwnam_auth.c 
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
index f404b7deb35037d8b52768e5f6f2fe45de6f863c..4d915d5449ad12102395e8e3058a3600b7bdb3f8 100644 (file)
@@ -6,6 +6,7 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
 
 libexec_PROGRAMS = mswin_auth
 
@@ -17,9 +18,7 @@ LDADD = \
        -lnetapi32 -ladvapi32 -lsspwin32 \
        $(XTRA_LIBS)
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 EXTRA_DIST = readme.txt
index 73990f66e6e1ee97f95d32c7824d05ad45acaf69..34be3078ad1c76dc35cf3af48d0a338ca86193b6 100644 (file)
@@ -6,6 +6,8 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
 libexec_PROGRAMS       = squid_radius_auth
 man_MANS               = squid_radius_auth.8
 EXTRA_DIST             = squid_radius_auth.8
@@ -15,9 +17,8 @@ squid_radius_auth_SOURCES = \
                        radius-util.c \
                        radius-util.h
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/include
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
index 5c3e095c1bfb4093fdb42bde63b16299a7d09212..82af4fe4430ca1e070ba6a756e341d0c20d5412b 100644 (file)
@@ -6,6 +6,12 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
+
 libexec_PROGRAMS = digest_edir_auth
 digest_edir_auth_SOURCES = digest_pw_auth.c \
        digest_common.h \
@@ -14,12 +20,6 @@ digest_edir_auth_SOURCES = digest_pw_auth.c \
        edir_ldapext.c \
        edir_ldapext.h
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
-
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
        -L$(top_builddir)/lib -lmiscutil \
index a96bcbc7e0f1e68b411f32107d12eb76ead31c32..7d57e771dd959fdfd8b0e511b73709157260c258 100644 (file)
@@ -6,18 +6,18 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
+
 libexec_PROGRAMS = digest_ldap_auth
 digest_ldap_auth_SOURCES = digest_pw_auth.c \
        digest_common.h \
        ldap_backend.c \
        ldap_backend.h
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
-
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
        -L$(top_builddir)/lib -lmiscutil \
index 83ea6313352ce634a6e96a5dd2a4f2149000967e..a2312086a0c3297f5fa96f1808cf76b28f39bc20 100644 (file)
@@ -6,18 +6,18 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
+
 libexec_PROGRAMS = digest_pw_auth
 digest_pw_auth_SOURCES = digest_pw_auth.c \
        digest_common.h \
        text_backend.c \
        text_backend.h
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
-
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
        -L$(top_builddir)/lib -lmiscutil \
index 870b3a163c47c444868213e9d70e082b8bd28c6f..7361cb4aaa0e4a72a2b69a864e919fa5bd0cf08d 100644 (file)
@@ -6,6 +6,11 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
 
 libexec_PROGRAMS = ip_user_check
 
@@ -21,14 +26,6 @@ EXTRA_DIST = \
        license \
        README
 
-# sysconf_DATA = 
-
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
-
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
        -L$(top_builddir)/lib -lmiscutil \
index ea6e25a1e8413625f478cb0920ef398641c3b3da..8ce92a39ce29b7a8006baedb2d4d4fad48fb7fde 100644 (file)
@@ -6,17 +6,17 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
+
 libexec_PROGRAMS               = squid_ldap_group
 man_MANS                       = squid_ldap_group.8
 EXTRA_DIST                     = squid_ldap_group.8
 squid_ldap_group_SOURCES       = squid_ldap_group.c
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
-
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
        -L$(top_builddir)/lib -lmiscutil \
index 9bc99ab18c7d8e1dee97a6569f53a81251f6fe5b..2a1aea0c123bde8c420a01826875b6ddfd38608e 100644 (file)
@@ -6,17 +6,17 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
+
 libexec_PROGRAMS               = squid_session
 man_MANS                       = squid_session.8
 EXTRA_DIST                     = squid_session.8
 squid_session_SOURCES          = squid_session.c
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
-
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
        @LIB_DB@
index a5625eaf80778c1cf1f55655f7d17ce726494ba5..bbecef2ffefc72b9596bf1646a7f5de82c8ce5ab 100644 (file)
@@ -6,17 +6,17 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
+
 libexec_PROGRAMS               = squid_unix_group
 man_MANS                       = squid_unix_group.8
 EXTRA_DIST                     = squid_unix_group.8
 squid_unix_group_SOURCES       = check_group.c
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
-
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
        -L$(top_builddir)/lib -lmiscutil \
index 487aff495cec91582710ee994e7cadac8aea6853..e0025761c4c54926b1456acbfc9a24b8374e548d 100644 (file)
@@ -4,12 +4,16 @@
 #  $Id$
 #
 
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
+
 libexec_PROGRAMS = mswin_negotiate_auth
 
 mswin_negotiate_auth_SOURCES = libnegotiatessp.c negotiate_auth.c negotiate.h
 
-INCLUDES      = -I. -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 LDADD          = -L$(top_builddir)/lib -lsspwin32 -ladvapi32 -lmiscutil $(XTRA_LIBS)
 
 EXTRA_DIST = readme.txt
index d62ac772ecd5b6e311f9126f5a1944dfd3dfcbea..8e8f102949c021e8d56c107009e45a643d929321 100644 (file)
@@ -6,14 +6,13 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
+
 libexec_PROGRAMS = fakeauth_auth
 fakeauth_auth_SOURCES  = fakeauth_auth.c ntlm.h
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
index a757c5d9b6c3a38a8794dcb5892e1b0bcc11b3c5..0e5b9e60133544626835b5244e8dd94009294eb6 100644 (file)
@@ -4,15 +4,14 @@
 #  $Id$
 #
 
+include $(top_srcdir)/src/Common.am
+
 libexec_PROGRAMS = mswin_ntlm_auth
 
 mswin_ntlm_auth_SOURCES = libntlmssp.c ntlm_auth.c ntlm.h
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
index b898adc5dbd21f87d46496d53d048426fbf5912e..afeb4932c7d2180f8703dc4ced743c4a74fadfa6 100644 (file)
@@ -2,17 +2,16 @@
 #  Makefile for the Squid Object Cache server
 #
 
+include $(top_srcdir)/src/Common.am
+
 SUBDIRS = smbval
 
 libexec_PROGRAMS = ntlm_smb_lm_auth
 ntlm_smb_lm_auth_SOURCES = libntlmssp.c ntlm_smb_lm_auth.c ntlm_smb_lm_auth.h
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src \
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += \
+       -I$(srcdir) \
        -I$(srcdir)/smbval
 
 LDADD = \
index bad9fc9c1d339fd58c2d5cdaef9bf71ad9705738..d1144cc12616381c35756e258264e3323c37f61f 100644 (file)
@@ -1,10 +1,10 @@
 # makefile for smblib
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
 
 noinst_LIBRARIES = libsmbvalid.a
 
index b181c2329d2fd7d33b88359105c3976d0212a293..1f56bae478b26ef27fd71d1f914f735d3eb6fe1f 100644 (file)
@@ -7,7 +7,7 @@
 #include "testRFC1035.h"
 
 /* Being a C library code it is best bodily included and tested with C++ type-safe techniques. */
-#include "rfc1035.c"
+#include "lib/rfc1035.c"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testRFC1035 );
 
index 378b36b348d7b6f9af20d3ec7547b3402862a0a8..d2d756f5f5708ec3e9046840514f62755bf2f0b2 100644 (file)
@@ -4,6 +4,7 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
 
 AUTOMAKE_OPTIONS = subdir-objects
 if USE_DNSSERVER
@@ -29,9 +30,6 @@ LOADABLE_MODULES_SOURCES = \
        LoadableModules.h \
        LoadableModules.cc
 
-TESTS=$(check_PROGRAMS)
-check_PROGRAMS=
-
 SUBDIRS        = base acl fs repl auth ip icmp
 
 if USE_ADAPTATION
@@ -152,9 +150,6 @@ else
 IDENT_SOURCE =
 endif
 
-AM_CFLAGS = @SQUID_CFLAGS@
-AM_CXXFLAGS = @SQUID_CXXFLAGS@
-
 EXTRA_LIBRARIES = libAIO.a libBlocking.a libDiskDaemon.a libDiskThreads.a
 noinst_LIBRARIES = @DISK_LIBS@
 noinst_LTLIBRARIES = libsquid.la
@@ -171,14 +166,8 @@ COMMON_LIBS = \
        ip/libip.la \
        fs/libfs.la
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/src \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include \
-       -I$(top_builddir)/lib \
-       -I$(top_srcdir)/lib \
-       @SQUID_CPPUNIT_INC@
+## Loadable Modules needs lib/libLtdl stuff
+INCLUDES += -I$(top_srcdir)/lib
 
 EXTRA_PROGRAMS = \
        DiskIO/DiskDaemon/diskd \
@@ -217,6 +206,9 @@ cf_gen_LDADD= \
        @MINGW_LIBS@
 cf_gen.$(OBJEXT): cf_gen_defines.h
 
+## cf_gen.cc needs src/cf_gen_defines.h
+INCLUDES += -I$(top_builddir)/src
+
 
 ACL_REGISTRATION_SOURCES = AclRegs.cc AuthReg.cc
 
@@ -719,9 +711,7 @@ DEFAULT_MIB_PATH    = $(datadir)/mib.txt
 DEFAULT_HOSTS          = @OPT_DEFAULT_HOSTS@
 
 # Make location configure settings available to the code
-DEFS = @DEFS@ -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" -DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\"
-
-$(OBJS): $(top_srcdir)/include/version.h ../include/autoconf.h
+DEFS += -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" -DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\"
 
 snmp_core.o snmp_agent.o: ../snmplib/libsnmp.a $(top_srcdir)/include/cache_snmp.h
 
@@ -807,7 +797,7 @@ uninstall-local:
        @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh $(RM) $(DESTDIR)$(DEFAULT_MIME_TABLE)
        @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh $(RM) $(DESTDIR)$(DEFAULT_CONFIG_FILE)
 
-CLEANFILES = cf_gen_defines.h cf.data cf_parser.h squid.conf.default squid.conf.documented \
+CLEANFILES += cf_gen_defines.h cf.data cf_parser.h squid.conf.default squid.conf.documented \
        globals.cc string_arrays.c repl_modules.cc DiskIO/DiskIOModules_gen.cc \
        test_tools.cc *.a
 
index 982585ce4559718c24c7dad47b9d988d340629a4..59a350c3ec12051b1bab213480a4c7fce41b66fc 100644 (file)
@@ -1,5 +1,8 @@
 include $(top_srcdir)/src/Common.am
 
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
 noinst_LTLIBRARIES = libauth.la libacls.la @AUTH_LIBS_TO_BUILD@
 EXTRA_LTLIBRARIES = libbasic.la libdigest.la libntlm.la libnegotiate.la
 
@@ -55,9 +58,6 @@ libnegotiate_la_SOURCES = \
        negotiate/auth_negotiate.cc \
        negotiate/auth_negotiate.h
 
-# TODO: fix #include statements so that this is not needed
-INCLUDES += -I.
-
 
 check_PROGRAMS += testHeaders
 
@@ -70,7 +70,5 @@ testHeaders: $(top_srcdir)/src/auth/*.h $(top_srcdir)/src/auth/basic/*.h $(top_s
        $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/src/auth/ntlm" || exit 1
        $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/src/auth/negotiate" || exit 1
 
-## No such file...
-testHeaders.c:
-       touch testHeaders.c
 CLEANFILES += testHeaders.c
+.PHONY: testHeaders
index 47d98a8f9d3aa97571b84c4668696880df2af6b3..664a866002efe1adae0ec0a109a92ae8e8bfbfb6 100644 (file)
@@ -35,8 +35,8 @@ libfs_la_DEPENDENCIES = @STORE_LIBS_TO_BUILD@
 EXTRA_DIST = \
        coss/coss-notes.txt
 
-# TODO: fix #include statements so that this is not needed
-INCLUDES += -I.
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 
 check_PROGRAMS += testHeaders
index c2912c5ce4b8c66c3863ca1cbb3b0cd71c3d650b..73c8c232a0c052c18da9f384ae6bb242fdc2f78f 100644 (file)
@@ -1,22 +1,6 @@
-#
-#  Makefile for the Squid ICMP and Network Measurement API
-#
-
-# Housekeeping, shared by all Squid Makefiles.
-# TODO: make this set by configure?
-AM_CFLAGS = @SQUID_CFLAGS@
-AM_CXXFLAGS = @SQUID_CXXFLAGS@
-DEFS = @DEFS@
-CLEANFILES = 
-
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/src \
-       -I$(top_srcdir)/include \
-       -I$(top_builddir)/lib \
-       @SQUID_CPPUNIT_INC@
-
-$(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h
+
+include $(top_srcdir)/src/Common.am
+include $(top_srcdir)/src/TestHeaders.am
 
 # TODO: get rid of this when config filename is no longer a global constant.
 #      its only here so the testIcmp will link .
@@ -67,11 +51,11 @@ pinger_SOURCES = \
 # depends on these but install/dist is done elsewhere.
 # TODO: remove when these are cleaned up in their own way.
 nodist_pinger_SOURCES = \
-       ../debug.cc \
-       ../globals.cc \
-       ../time.cc \
-       ../SquidConfig.cc \
-       ../SquidNew.cc
+       $(top_srcdir)/src/debug.cc \
+       $(top_builddir)/src/globals.cc \
+       $(top_srcdir)/src/time.cc \
+       $(top_srcdir)/src/SquidConfig.cc \
+       $(top_srcdir)/src/SquidNew.cc
 
 pinger_LDFLAGS = $(LIBADD_DL)
 pinger_LDADD=\
@@ -98,19 +82,8 @@ pinger_DEPENDENCIES= \
 ##     fi
 
 
-check_PROGRAMS= testIcmp testHeaders
-TESTS= $(check_PROGRAMS)
-
-## Special Universal .h dependency test script
-## aborts if error encountered
-testHeaders: $(top_srcdir)/src/icmp/*.h
-       $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/src/icmp/" || exit 1
-
-## No such file...
-testHeaders.c:
-       touch testHeaders.c
-CLEANFILES += testHeaders.c
-
+check_PROGRAMS += testIcmp
+TESTS += testIcmp
 
 ## Tests of the ICMP base module.
 # Its used by pinger so SHOULD NOT require more dependancies! :-(
@@ -119,11 +92,11 @@ testIcmp_SOURCES = \
        testIcmp.h \
        testIcmp.cc
 nodist_testIcmp_SOURCES = \
-       ../tests/testMain.cc \
-       ../SquidTime.h \
-       ../time.cc \
-       ../../test-suite/test_tools.cc \
-       ../globals.cc
+       $(top_srcdir)/src/tests/testMain.cc \
+       $(top_srcdir)/src/SquidTime.h \
+       $(top_srcdir)/src/time.cc \
+       $(top_srcdir)/test-suite/test_tools.cc \
+       $(top_builddir)/src/globals.cc
 testIcmp_LDFLAGS = $(LIBADD_DL)
 testIcmp_LDADD=\
        @SQUID_CPPUNIT_LIBS@ \
index 4961985eab4d137532aa1979d8519d2a0f541ff6..dfbebd163497079d9d0c1b4ca4fbb7f4ea5e9ac5 100644 (file)
@@ -1,25 +1,5 @@
-#
-#  Makefile for the Squid IP layer API
-#
-
-# Housekeeping, shared by all Squid Makefiles.
-# TODO: make this set by configure?
-AM_CFLAGS = @SQUID_CFLAGS@
-AM_CXXFLAGS = @SQUID_CXXFLAGS@
-DEFS = @DEFS@
-CLEANFILES = 
-
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/include \
-       -I$(top_builddir)/lib \
-       -I$(top_srcdir)/src \
-       @SQUID_CPPUNIT_INC@ 
-
-$(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h
-
-
-# IP Specific Configurations
+include $(top_srcdir)/src/Common.am
+include $(top_srcdir)/src/TestHeaders.am
 
 noinst_LTLIBRARIES = libip.la
 
@@ -32,19 +12,8 @@ libip_la_SOURCES = \
        QosConfig.cc
 
 
-check_PROGRAMS= testHeaders testIpAddress
-TESTS= $(check_PROGRAMS)
-
-## Special Universal .h dependency test script
-## aborts if error encountered
-testHeaders: $(top_srcdir)/src/ip/*.h
-       $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/src/ip/" || exit 1
-
-## No such file...
-testHeaders.c:
-       touch testHeaders.c
-CLEANFILES += testHeaders.c
-
+check_PROGRAMS += testIpAddress
+TESTS += testIpAddress
 
 testIpAddress_SOURCES= \
        testIpAddress.cc \
index 22a6bb6e654e16030963a98baf2acdcf5b9aa857..1799a0663e02b1e3d5b24dca20fd41f4c0e58c43 100644 (file)
@@ -3,10 +3,12 @@
 #  $Id$
 #
 
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
 AUTOMAKE_OPTIONS = subdir-objects
-AM_CFLAGS = @SQUID_CFLAGS@
-AM_CXXFLAGS = @SQUID_CXXFLAGS@
-CLEANFILES = 
 
 # No recursion is needed for the subdirs, we build from here. // @REPL_POLICIES@
 
@@ -16,14 +18,8 @@ noinst_LIBRARIES = @REPL_LIBS@
 liblru_a_SOURCES = lru/store_repl_lru.cc
 libheap_a_SOURCES = heap/store_heap_replacement.h heap/store_heap_replacement.cc heap/store_repl_heap.cc
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src
-
-check_PROGRAMS= testHeaders
+## Until such time as we have a makefile in src/repl/heap etc.
+check_PROGRAMS += testHeaders
 
 ## Special Universal .h dependency test script
 ## aborts if error encountered
@@ -32,7 +28,5 @@ testHeaders: $(top_srcdir)/src/repl/heap/*.h
 ## ./ has no .h files.
 ## ./lru/ has no .h files.
 
-## No such file...
-testHeaders.c:
-       touch testHeaders.c
-CLEANFILES += testHeaders.c
+CLEANFILES += testHeaders
+.PHONY: testHeaders
index 2718487481732c68a82c0d3a5f68c832f2ee32c5..469bf7d22a8b497c166faf31e745b9f16dea99f2 100644 (file)
@@ -4,17 +4,12 @@
 #  $Id$
 #
 
-AUTOMAKE_OPTIONS = subdir-objects
+include $(top_srcdir)/src/Common.am
 
-AM_CFLAGS = @SQUID_CFLAGS@
-AM_CXXFLAGS = @SQUID_CXXFLAGS@
+AUTOMAKE_OPTIONS = subdir-objects
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
 
 LDADD = \
        $(top_builddir)/compat/libcompat.la \
@@ -36,7 +31,7 @@ else
 endif
 
 ## Sort by dependencies - test lowest layers first
-TESTS = debug \
+TESTS += debug \
        syntheticoperators \
        VirtualDeleteOperator \
        StackTest \
@@ -49,7 +44,7 @@ TESTS = debug \
        $(ESI_TESTS)
 
 ## Sort by alpha - any build failures are significant.
-check_PROGRAMS= debug \
+check_PROGRAMS += debug \
                $(ESI_TESTS) \
                MemPoolTest\
                mem_node_test\
index 9b8dda7cd17d7128787f475ab1ddf92293ec0bd1..b158011e8fce1fcc7011f2a7e972c08e175b6a2e 100644 (file)
@@ -4,30 +4,13 @@
 #  Uncomment and customize the following to suit your needs:
 #
 
+include $(top_srcdir)/src/Common.am
 
 AUTOMAKE_OPTIONS = subdir-objects
 
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I. \
-       -I$(top_builddir)/include \
-       -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src \
-       @SQUID_CPPUNIT_INC@
-#      -I$(top_srcdir)/lib/libTrie/include
-#      -I$(srcdir)
-
-TESTS=$(check_PROGRAMS)
-#check_PROGRAMS= testHeaders
-
-### Special Universal .h dependency test script
-#testHeaders: *.h
-# ./ has no .h files
-#
-## No Such file...
-#testHeaders.c:
-#      touch testHeaders.c
-#CLEANFILES += testHeaders.c
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
 
 SUBDIRS                =