From: Francesco Chemolli Date: Sun, 13 Jul 2008 21:40:50 +0000 (+0200) Subject: Fix out-of-sourcedir "make check" dependency misdetection. X-Git-Tag: SQUID_3_1_0_1~49^2~143^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b3ed82cb463579f3072524133b5601edeee0558;p=thirdparty%2Fsquid.git Fix out-of-sourcedir "make check" dependency misdetection. Fix "make check" by implementing a cachemgr stub to resolve link dependencies. --- diff --git a/src/ICAP/Makefile.am b/src/ICAP/Makefile.am index 6e4c5d851b..2f91bf853b 100644 --- a/src/ICAP/Makefile.am +++ b/src/ICAP/Makefile.am @@ -33,7 +33,7 @@ libicap_la_SOURCES = \ check_PROGRAMS = testHeaders ## test .h correctness -testHeaders: *.h +testHeaders: $(top_srcdir)/src/ICAP/*.h $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "." || exit 1 ## No such file... diff --git a/src/Makefile.am b/src/Makefile.am index 734626394d..b07c581f42 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1189,7 +1189,7 @@ check_PROGRAMS+= testHeaders \ ## Special Universal .h dependency test script ## aborts if error encountered -testHeaders: *.h DiskIO/*.h +testHeaders: $(top_srcdir)/src/*.h $(top_srcdir)/src/DiskIO/*.h $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "." || exit 1 $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "DiskIO" || exit 1 ## src/repl/ has no .h files and its own makefile. @@ -1231,6 +1231,7 @@ tests_testAuth_SOURCES= tests/testAuth.cc tests/testMain.cc tests/testAuth.h $( StatHist.cc HttpHdrRange.cc ETag.cc tests/stub_errorpage.cc \ tests/stub_HttpRequest.cc tests/stub_DelayId.cc \ tests/stub_MemObject.cc mem_node.cc \ + tests/stub_cache_manager.cc \ stmem.cc \ tests/stub_comm.cc \ tests/stub_http.cc \ @@ -1311,6 +1312,7 @@ tests_testACLMaxUserIP_SOURCES= \ tests/stub_DelayId.cc \ tests/stub_MemObject.cc \ tests/stub_store.cc \ + tests/stub_cache_manager.cc \ tests/testACLMaxUserIP.cc \ tests/testACLMaxUserIP.h \ tests/testMain.cc \ diff --git a/src/adaptation/Makefile.am b/src/adaptation/Makefile.am index fb09a726c6..ec77f05ce5 100644 --- a/src/adaptation/Makefile.am +++ b/src/adaptation/Makefile.am @@ -32,7 +32,7 @@ libadaptation_la_SOURCES = \ check_PROGRAMS = testHeaders ## test .h correctness -testHeaders: *.h +testHeaders: $(top_srcdir)/src/adaptation/*.h $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "." || exit 1 ## No such file... diff --git a/src/auth/Makefile.am b/src/auth/Makefile.am index 9209314843..8dd460ac55 100644 --- a/src/auth/Makefile.am +++ b/src/auth/Makefile.am @@ -24,7 +24,7 @@ check_PROGRAMS= testHeaders ## Special Universal .h dependency test script ## aborts if error encountered -testHeaders: basic/*.h digest/*.h ntlm/*.h negotiate/*.h +testHeaders: $(top_srcdir)/src/auth/basic/*.h $(top_srcdir)/src/auth/digest/*.h $(top_srcdir)/src/auth/ntlm/*.h $(top_srcdir)/src/auth/negotiate/*.h $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "basic" || exit 1 $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "digest" || exit 1 $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "ntlm" || exit 1 diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index c2a8a6a7f0..e28a7db5c5 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am @@ -36,7 +36,7 @@ check_PROGRAMS=testHeaders ## Special Universal .h dependency test script ## aborts if error encountered -testHeaders: ufs/*.h coss/*.h +testHeaders: $(top_srcdir)/src/fs/ufs/*.h $(top_srcdir)/src/fs/coss/*.h $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "ufs" || exit 1 $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "coss" || exit 1 ## diskd/ has no .h files diff --git a/src/main.cc b/src/main.cc index 17f416f212..d843b72ed3 100644 --- a/src/main.cc +++ b/src/main.cc @@ -726,7 +726,6 @@ mainReconfigure(void) serverConnectionsOpen(); neighbors_init(); - // neighborsRegisterWithCacheManager(); //moved to neighbors_init() storeDirOpenSwapLogs(); diff --git a/src/repl/Makefile.am b/src/repl/Makefile.am index 0710ce2b98..ff7823cabf 100644 --- a/src/repl/Makefile.am +++ b/src/repl/Makefile.am @@ -22,7 +22,7 @@ check_PROGRAMS= testHeaders ## Special Universal .h dependency test script ## aborts if error encountered -testHeaders: heap/*.h +testHeaders: $(top_srcdir)/src/repl/heap/*.h $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "heap" || exit 1 ## ./ has no .h files. ## ./lru/ has no .h files. diff --git a/src/tests/stub_cache_manager.cc b/src/tests/stub_cache_manager.cc new file mode 100644 index 0000000000..40ee815ce1 --- /dev/null +++ b/src/tests/stub_cache_manager.cc @@ -0,0 +1,70 @@ +/* + * AUTHOR: Francesco Chemolli + * + * SQUID Web Proxy Cache http://www.squid-cache.org/ + * ---------------------------------------------------------- + * + * Squid is the result of efforts by numerous individuals from + * the Internet community; see the CONTRIBUTORS file for full + * details. Many organizations have provided support for Squid's + * development; see the SPONSORS file for full details. Squid is + * Copyrighted (C) 2001 by the Regents of the University of + * California; see the COPYRIGHT file for full details. Squid + * incorporates software developed and/or copyrighted by other + * sources; see the CREDITS file for full details. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. + * + */ + +#include "CacheManager.h" +#include "squid.h" + +CacheManager::CacheManager() +{ +} + +void +CacheManager::registerAction(char const * action, char const * desc, OBJH * handler, int pw_req_flag, int atomic) +{ + fatal("Not implemented"); +} + +void +CacheManager::registerAction(CacheManagerAction *anAction) +{ + fatal("Not implemented"); +} + +CacheManagerAction * +CacheManager::findAction(char const * action) +{ + fatal("Not implemented"); + return 0; //notreached +} + +void +CacheManager::Start(int fd, HttpRequest * request, StoreEntry * entry) +{ + fatal("Not implemented"); +} + +CacheManager* +CacheManager::GetInstance() +{ + fatal("Not implemented"); + return 0; //notreached +} + diff --git a/src/tests/testCacheManager.cc b/src/tests/testCacheManager.cc index a66a54f564..2de748ba4b 100644 --- a/src/tests/testCacheManager.cc +++ b/src/tests/testCacheManager.cc @@ -32,7 +32,7 @@ void testCacheManager::setUp() void testCacheManager::testCreate() { - CacheManager(); + CacheManager()::GetInstance(); //it's a singleton.. } /* an action to register */