From: Amos Jeffries Date: Mon, 6 Dec 2010 14:06:06 +0000 (+1300) Subject: Fix 'can't create ./src/***: No such file' errors on linking X-Git-Tag: take1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b88dc7a7540a6eba467fa45550faa9860640f14;p=thirdparty%2Fsquid.git Fix 'can't create ./src/***: No such file' errors on linking Side effect of the AIX port fixes using .o instead of duplicating and re-building the .cc individually. "It seemed a good idea at the time"(tm). It is a bit strange that it should only show up now, those changes were made long ago. Anyways, I've come to the conclusion from other places that the rebuild is slower to compile but a lot safer to deal with linkage and dependencies. --- diff --git a/tools/Makefile.am b/tools/Makefile.am index 8763081bdd..a22e37b397 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -17,8 +17,6 @@ man_MANS = DISTCLEANFILES = LDADD = \ - $(top_builddir)/src/tests/stub_debug.o \ - $(top_builddir)/src/time.o \ $(top_builddir)/src/ip/libip.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ @@ -28,15 +26,23 @@ LDADD = \ include $(top_srcdir)/doc/manuals/Substitute.am +## Several files need to be shared but we cannot depend on the other +## directories to be built. test_tools.cc: $(top_srcdir)/test-suite/test_tools.cc cp $(top_srcdir)/test-suite/test_tools.cc . +stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc + cp $(top_srcdir)/src/tests/stub_debug.cc . + +time.cc: $(top_srcdir)/src/time.cc + cp $(top_srcdir)/src/time.cc . + # stock tools for unit tests - library independent versions of dlink_list # etc. # globals.cc is needed by test_tools.cc. # Neither of these should be disted from here. TESTSOURCES= test_tools.cc -CLEANFILES += test_tools.cc +CLEANFILES += test_tools.cc stub_debug.cc time.cc ## ##### helper-mux ##### @@ -51,7 +57,9 @@ EXTRA_DIST += helper-ok-dying.pl helper-ok.pl bin_PROGRAMS = squidclient squidclient_SOURCES = squidclient.cc \ - test_tools.cc + stub_debug.cc \ + test_tools.cc \ + time.cc EXTRA_DIST += squidclient.1 man_MANS += squidclient.1 @@ -65,7 +73,9 @@ DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf libexec_PROGRAMS = cachemgr$(CGIEXT) cachemgr__CGIEXT__SOURCES = cachemgr.cc \ - test_tools.cc + stub_debug.cc \ + test_tools.cc \ + time.cc cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS)