summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--Makefile.in4
-rwxr-xr-xacprep8
-rwxr-xr-xvalgrind.sh9
4 files changed, 20 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 81e6da18..8eb15b8b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -238,8 +238,10 @@ fullcheck: UnitTests
MallocGuardEdges=1 \
MallocScribble=1 \
MallocPreScribble=1 \
+ MallocCheckHeapStart=100 \
+ MallocCheckHeapEach=100 \
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
- $(top_builddir)/UnitTests --verify
+ $(srcdir)/valgrind.sh $(top_builddir)/UnitTests --verify
######################################################################
diff --git a/Makefile.in b/Makefile.in
index 530e5017..d9ec1f86 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1862,8 +1862,10 @@ fullcheck: UnitTests
MallocGuardEdges=1 \
MallocScribble=1 \
MallocPreScribble=1 \
+ MallocCheckHeapStart=100 \
+ MallocCheckHeapEach=100 \
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
- $(top_builddir)/UnitTests --verify
+ $(srcdir)/valgrind.sh $(top_builddir)/UnitTests --verify
alldocs: docs/ledger.info docs/ledger.pdf doxygen-docs
diff --git a/acprep b/acprep
index 6ed37e84..e2a4f8c0 100755
--- a/acprep
+++ b/acprep
@@ -11,8 +11,10 @@ PYTHON_HOME="/Library/Frameworks/Python.framework/Versions/2.5"
# linker flags for all the various build permutations I use for
# testing and profiling.
-if which glibtoolize > /dev/null 2>&1; then
- glibtoolize --automake -f -c
+LIBTOOLIZE=$(which glibtoolize 2>&1)
+
+if [ -x "$LIBTOOLIZE" ]; then
+ "$LIBTOOLIZE" --automake -f -c
else
libtoolize --automake -f -c
fi
@@ -63,7 +65,7 @@ while [ -n "$1" ]; do
# CPPFLAGS="-I/usr/local/include/stlport $CPPFLAGS"
# LIBS="$LIBS -lstlportstlg"
#fi
- CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1" ;;
+ CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1"
CXXFLAGS="$CXXFLAGS -g" ;;
--prof | --perf)
diff --git a/valgrind.sh b/valgrind.sh
new file mode 100755
index 00000000..fe292f44
--- /dev/null
+++ b/valgrind.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+VALGRIND=$(which valgrind 2>&1)
+
+if [ -x "$VALGRIND" ]; then
+ exec "$VALGRIND" --leak-check=full --show-reachable=yes "$@"
+else
+ exec "$@"
+fi