]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Reuse (shared) cachegrind source files in callgrind directly.
authorMark Wielaard <mark@klomp.org>
Tue, 3 Sep 2013 15:22:14 +0000 (15:22 +0000)
committerMark Wielaard <mark@klomp.org>
Tue, 3 Sep 2013 15:22:14 +0000 (15:22 +0000)
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

callgrind/Makefile.am
callgrind/sim.c

index 2953aa0c580883ea22ad309a1d7e4ce382b59116..56e8a04c239733514006e3dcae95444ad8088a1c 100644 (file)
@@ -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      = \
index 4d3fcc1d7e964b7b77d8350bf089220b8a99aee7..d2f9a4ce77dc78390fc1598248c0f010da88762d 100644 (file)
@@ -44,7 +44,7 @@
 */
 
 /* Cache configuration */
-#include "cg_arch.h"
+#include "cg_arch.c"
 
 /* additional structures for cache use info, separated
  * according usage frequency: