From: Mark Wielaard Date: Tue, 3 Sep 2013 15:22:14 +0000 (+0000) Subject: Reuse (shared) cachegrind source files in callgrind directly. X-Git-Tag: svn/VALGRIND_3_9_0~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=363d971e32710614a3a453460aeade0f55660c5d;p=thirdparty%2Fvalgrind.git Reuse (shared) cachegrind source files in callgrind directly. The callgrind Makefile.am had a common sources list that included ../cachegrind/cg_arch.c. This doesn't play well with automake and subdir-objects. Especially make distclean was broken because some .deps files were removed multiple times. Just include the shared source file directly into the callgrind source file that needs it (cg_arch.c in sim.c). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13528 --- diff --git a/callgrind/Makefile.am b/callgrind/Makefile.am index 2953aa0c58..56e8a04c23 100644 --- a/callgrind/Makefile.am +++ b/callgrind/Makefile.am @@ -44,9 +44,9 @@ CALLGRIND_SOURCES_COMMON = \ jumps.c \ main.c \ sim.c \ - threads.c \ - ../cachegrind/cg_arch.c + threads.c +# We sneakily include "cg_branchpred.c" and "cg_arch.c" from cachegrind CALLGRIND_CFLAGS_COMMON = -I$(top_srcdir)/cachegrind callgrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = \ diff --git a/callgrind/sim.c b/callgrind/sim.c index 4d3fcc1d7e..d2f9a4ce77 100644 --- a/callgrind/sim.c +++ b/callgrind/sim.c @@ -44,7 +44,7 @@ */ /* Cache configuration */ -#include "cg_arch.h" +#include "cg_arch.c" /* additional structures for cache use info, separated * according usage frequency: