---------------------
PatchSet 6886 
Date: 2008/02/20 11:38:43
Author: amosjeffries
Branch: cleanup
Tag: (none) 
Log:
Adjust .h test script to handle non-current directory
Also add better macro parameter for current compiler options

Members: 
	lib/Makefile.am:1.26.4.3->1.26.4.4 
	src/Makefile.am:1.138.2.4->1.138.2.5 
	src/Store.h:1.41.4.2->1.41.4.3 
	src/SwapDir.h:1.16->1.16.10.1 
	src/auth/Makefile.am:1.6.40.2->1.6.40.3 
	src/fs/Makefile.am:1.13.4.2->1.13.4.3 
	src/fs/ufs/StoreFSufs.h:1.5->1.5.34.1 
	src/fs/ufs/ufscommon.h:1.12.10.1->1.12.10.2 
	test-suite/testheaders.sh:1.1.2.4->1.1.2.5 
	tools/Makefile.am:1.1.48.1->1.1.48.2 

Index: squid3/lib/Makefile.am
===================================================================
RCS file: /cvsroot/squid-sf//squid3/lib/Makefile.am,v
retrieving revision 1.26.4.3
retrieving revision 1.26.4.4
diff -u -r1.26.4.3 -r1.26.4.4
--- squid3/lib/Makefile.am	20 Feb 2008 08:00:20 -0000	1.26.4.3
+++ squid3/lib/Makefile.am	20 Feb 2008 11:38:43 -0000	1.26.4.4
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 #
-#  $Id: Makefile.am,v 1.26.4.3 2008/02/20 08:00:20 amosjeffries Exp $
+#  $Id: Makefile.am,v 1.26.4.4 2008/02/20 11:38:43 amosjeffries Exp $
 #
 
 DIST_SUBDIRS = libTrie
@@ -102,9 +102,8 @@
 
 ## Special Universal .h dependency test script
 ## aborts if error encountered
-testHeaders:
-	cd ../include && ../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	mv ../include/testHeaders .
+testHeaders: ../include/*.h
+	../test-suite/testheaders.sh "$(CXXCOMPILE)" "../include" || exit 1
 
 tests_testAll_SOURCES= \
 	tests/testArray.h \
Index: squid3/src/Makefile.am
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/Makefile.am,v
retrieving revision 1.138.2.4
retrieving revision 1.138.2.5
diff -u -r1.138.2.4 -r1.138.2.5
--- squid3/src/Makefile.am	20 Feb 2008 08:00:20 -0000	1.138.2.4
+++ squid3/src/Makefile.am	20 Feb 2008 11:38:44 -0000	1.138.2.5
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.am,v 1.138.2.4 2008/02/20 08:00:20 amosjeffries Exp $
+#  $Id: Makefile.am,v 1.138.2.5 2008/02/20 11:38:44 amosjeffries Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -1168,8 +1168,8 @@
 
 ## Special Universal .h dependency test script
 ## aborts if error encountered
-testHeaders:
-	../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
+testHeaders: *.h
+	../test-suite/testheaders.sh "$(CXXCOMPILE)" "." || exit 1
 
 ### Template for new Unit Test Program
 ## - add tests/testX to check_PROGRAMS above.
Index: squid3/src/Store.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/Store.h,v
retrieving revision 1.41.4.2
retrieving revision 1.41.4.3
diff -u -r1.41.4.2 -r1.41.4.3
--- squid3/src/Store.h	13 Feb 2008 03:52:51 -0000	1.41.4.2
+++ squid3/src/Store.h	20 Feb 2008 11:38:44 -0000	1.41.4.3
@@ -1,6 +1,5 @@
-
 /*
- * $Id: Store.h,v 1.41.4.2 2008/02/13 03:52:51 amosjeffries Exp $
+ * $Id: Store.h,v 1.41.4.3 2008/02/20 11:38:44 amosjeffries Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -30,7 +29,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  *
  */
-
 #ifndef SQUID_STORE_H
 #define SQUID_STORE_H
 
Index: squid3/src/SwapDir.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/SwapDir.h,v
retrieving revision 1.16
retrieving revision 1.16.10.1
diff -u -r1.16 -r1.16.10.1
--- squid3/src/SwapDir.h	28 Sep 2007 00:51:09 -0000	1.16
+++ squid3/src/SwapDir.h	20 Feb 2008 11:38:44 -0000	1.16.10.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: SwapDir.h,v 1.16 2007/09/28 00:51:09 squidadm Exp $
+ * $Id: SwapDir.h,v 1.16.10.1 2008/02/20 11:38:44 amosjeffries Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -30,7 +29,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  *
  */
-
 #ifndef SQUID_SWAPDIR_H
 #define SQUID_SWAPDIR_H
 
Index: squid3/src/auth/Makefile.am
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/auth/Makefile.am,v
retrieving revision 1.6.40.2
retrieving revision 1.6.40.3
diff -u -r1.6.40.2 -r1.6.40.3
--- squid3/src/auth/Makefile.am	20 Feb 2008 08:00:21 -0000	1.6.40.2
+++ squid3/src/auth/Makefile.am	20 Feb 2008 11:38:44 -0000	1.6.40.3
@@ -1,6 +1,6 @@
 #  Makefile for authentication modules in the Squid Object Cache server
 #
-#  $Id: Makefile.am,v 1.6.40.2 2008/02/20 08:00:21 amosjeffries Exp $
+#  $Id: Makefile.am,v 1.6.40.3 2008/02/20 11:38:44 amosjeffries Exp $
 #
 AUTOMAKE_OPTIONS = subdir-objects
 AM_CFLAGS = @SQUID_CFLAGS@
@@ -24,13 +24,9 @@
 
 ## Special Universal .h dependency test script
 ## aborts if error encountered
-testHeaders:
-	../../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	cd basic && ../../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	rm basic/testHeaders
-	cd digest && ../../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	rm digest/testHeaders
-	cd ntlm && ../../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	rm ntlm/testHeaders
-	cd negotiate && ../../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	rm negotiate/testHeaders
+testHeaders: *.h basic/*.h digest/*.h ntlm/*.h negotiate/*.h
+	../../test-suite/testheaders.sh "$(CXXCOMPILE)" "." || exit 1
+	../../test-suite/testheaders.sh "$(CXXCOMPILE)" "basic" || exit 1
+	../../test-suite/testheaders.sh "$(CXXCOMPILE)" "digest" || exit 1
+	../../test-suite/testheaders.sh "$(CXXCOMPILE)" "ntlm" || exit 1
+	../../test-suite/testheaders.sh "$(CXXCOMPILE)" "negotiate" || exit 1
Index: squid3/src/fs/Makefile.am
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/Makefile.am,v
retrieving revision 1.13.4.2
retrieving revision 1.13.4.3
diff -u -r1.13.4.2 -r1.13.4.3
--- squid3/src/fs/Makefile.am	20 Feb 2008 08:00:21 -0000	1.13.4.2
+++ squid3/src/fs/Makefile.am	20 Feb 2008 11:38:44 -0000	1.13.4.3
@@ -1,6 +1,6 @@
 #  Makefile for storage modules in the Squid Object Cache server
 #
-#  $Id: Makefile.am,v 1.13.4.2 2008/02/20 08:00:21 amosjeffries Exp $
+#  $Id: Makefile.am,v 1.13.4.3 2008/02/20 11:38:44 amosjeffries Exp $
 #
 
 AUTOMAKE_OPTIONS = subdir-objects
@@ -36,16 +36,11 @@
 
 ## Special Universal .h dependency test script
 ## aborts if error encountered
-testHeaders:
-	../../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	cd diskd && ../../../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	rm -f diskd/testHeaders
-	cd ufs && ../../../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	rm -f ufs/testHeaders
-	cd aufs && ../../../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	rm -f aufs/testHeaders
-	cd coss && ../../../test-suite/testheaders.sh "$(CXX)" "$(CXXFLAGS)" "$(INCLUDES)" || exit 1
-	rm -f coss/testHeaders
+testHeaders: diskd/*.h ufs/*.h aufs/*.h coss/*.h
+	../../../test-suite/testheaders.sh "$(CXXCOMPILE)" "diskd" || exit 1
+	../../../test-suite/testheaders.sh "$(CXXCOMPILE)" "ufs" || exit 1
+	../../../test-suite/testheaders.sh "$(CXXCOMPILE)" "aufs" || exit 1
+	../../../test-suite/testheaders.sh "$(CXXCOMPILE)" "coss" || exit 1
 
 
 ## targets below to emulate distributed makefiles
Index: squid3/src/fs/ufs/StoreFSufs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/ufs/StoreFSufs.h,v
retrieving revision 1.5
retrieving revision 1.5.34.1
diff -u -r1.5 -r1.5.34.1
--- squid3/src/fs/ufs/StoreFSufs.h	14 Sep 2006 01:50:33 -0000	1.5
+++ squid3/src/fs/ufs/StoreFSufs.h	20 Feb 2008 11:38:44 -0000	1.5.34.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: StoreFSufs.h,v 1.5 2006/09/14 01:50:33 squidadm Exp $
+ * $Id: StoreFSufs.h,v 1.5.34.1 2008/02/20 11:38:44 amosjeffries Exp $
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  * ----------------------------------------------------------
@@ -30,7 +29,6 @@
  *
  * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
  */
-
 #ifndef SQUID_STOREFSUFS_H
 #define SQUID_STOREFSUFS_H
 
Index: squid3/src/fs/ufs/ufscommon.h
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/fs/ufs/ufscommon.h,v
retrieving revision 1.12.10.1
retrieving revision 1.12.10.2
diff -u -r1.12.10.1 -r1.12.10.2
--- squid3/src/fs/ufs/ufscommon.h	20 Feb 2008 08:00:21 -0000	1.12.10.1
+++ squid3/src/fs/ufs/ufscommon.h	20 Feb 2008 11:38:44 -0000	1.12.10.2
@@ -1,5 +1,5 @@
 /*
- * $Id: ufscommon.h,v 1.12.10.1 2008/02/20 08:00:21 amosjeffries Exp $
+ * $Id: ufscommon.h,v 1.12.10.2 2008/02/20 11:38:44 amosjeffries Exp $
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  * ----------------------------------------------------------
@@ -32,13 +32,11 @@
 #define SQUID_UFSCOMMON_H
 
 #include "squid.h"
+#include "event.h"
 
-/** \todo FUBAR: event.h is in src/ */
-#include "../../event.h"
-
-#define DefaultLevelOneDirs     16
-#define DefaultLevelTwoDirs     256
-#define STORE_META_BUFSZ 4096
+#define DefaultLevelOneDirs	16
+#define DefaultLevelTwoDirs	256
+#define STORE_META_BUFSZ	4096
 
 /* Common UFS routines */
 #include "SwapDir.h"
@@ -289,8 +287,8 @@
     void doWrite();
 };
 
-MEMPROXY_CLASS_INLINE(UFSStoreState::_queued_read)
-MEMPROXY_CLASS_INLINE(UFSStoreState::_queued_write)
+MEMPROXY_CLASS_INLINE(UFSStoreState::_queued_read);
+MEMPROXY_CLASS_INLINE(UFSStoreState::_queued_write);
 
 class StoreSearchUFS : public StoreSearch
 {
Index: squid3/test-suite/testheaders.sh
===================================================================
RCS file: /cvsroot/squid-sf//squid3/test-suite/Attic/testheaders.sh,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- squid3/test-suite/testheaders.sh	20 Feb 2008 08:00:21 -0000	1.1.2.4
+++ squid3/test-suite/testheaders.sh	20 Feb 2008 11:38:45 -0000	1.1.2.5
@@ -8,21 +8,25 @@
 #
 # This script should be run from the makefile with the directory path and ccflags
 #
-cc="$1"
-flags="$2"
-libs="$3"
+cc="${1}"
 
-for f in `ls -1 *.h 2>/dev/null`; do
-	echo -n "Testing ${f} ..."
-	if [ ${f} -nt ./testHeaderDeps_${f/.h/}.o ]; then
+if [ "${2}" == "" ]; then
+	dir="."
+else
+	dir="${2}"
+fi
+
+for f in `cd ${dir} && ls -1 *.h 2>/dev/null`; do
+	echo -n "Testing ${dir}/${f} ..."
+	if [ ${dir}/${f} -nt ./testHeaderDeps_${f/.h/}.o ]; then
 		(	echo "/* This file is AUTOMATICALLY GENERATED. DO NOT ALTER IT */"
-			echo "#include \"${f}\" "
+			echo "#include \"${dir}/${f}\" "
 			echo "int main( int argc, char* argv[] ) { return 0; } "
 		) >./testHeaderDeps_${f/.h/}.cc
 
 		# run compile test on the new file.
-		# DEBUG: echo "TRY: ${cc} -o testHeaderDeps.o ${flags} ./testHeaderDeps_${f/.h/}.cc ${libs}"
-		${cc} -o testHeaderDeps_${f/.h/}.o ${flags} ./testHeaderDeps_${f/.h/}.cc ${libs} || exit 1
+		# DEBUG: echo "TRY: ${cc} -o testHeaderDeps.o ./testHeaderDeps_${f/.h/}.cc"
+		${cc} -o testHeaderDeps_${f/.h/}.o ./testHeaderDeps_${f/.h/}.cc || exit 1
 		rm ./testHeaderDeps_${f/.h/}.cc
 	fi
 	echo "OK."
Index: squid3/tools/Makefile.am
===================================================================
RCS file: /cvsroot/squid-sf//squid3/tools/Makefile.am,v
retrieving revision 1.1.48.1
retrieving revision 1.1.48.2
diff -u -r1.1.48.1 -r1.1.48.2
--- squid3/tools/Makefile.am	19 Feb 2008 03:53:07 -0000	1.1.48.1
+++ squid3/tools/Makefile.am	20 Feb 2008 11:38:45 -0000	1.1.48.2
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.am,v 1.1.48.1 2008/02/19 03:53:07 amosjeffries Exp $
+#  $Id: Makefile.am,v 1.1.48.2 2008/02/20 11:38:45 amosjeffries Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -16,8 +16,8 @@
 check_PROGRAMS= testHeaders
 
 ## Special Universal .h dependency test script
-testHeaders:
-	../test-suite/testheaders.sh "$(CC)" "$(LDFLAGS)" "$(STD_APP_LIBS)"
+testHeaders: *.h
+	../test-suite/testheaders.sh "$(CXXCOMPILE)" "."
 
 SUBDIRS		= 
 
