Removed the need for an external valgrind.sh script. Using autoconf instead.
This commit is contained in:
parent
651ada9cad
commit
ac441fdd64
3 changed files with 26 additions and 30 deletions
20
Makefile.am
20
Makefile.am
|
|
@ -271,6 +271,12 @@ RegressionTests: $(srcdir)/test/regress.py
|
|||
echo "python $(srcdir)/test/regress.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/regress" > $@
|
||||
chmod 755 $@
|
||||
|
||||
if HAVE_VALGRIND
|
||||
VALGRIND = valgrind
|
||||
else
|
||||
VALGRIND =
|
||||
endif
|
||||
|
||||
fullcheck: check
|
||||
MallocGuardEdges=1 \
|
||||
MallocScribble=1 \
|
||||
|
|
@ -278,7 +284,7 @@ fullcheck: check
|
|||
MallocCheckHeapStart=100 \
|
||||
MallocCheckHeapEach=100 \
|
||||
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
|
||||
$(srcdir)/valgrind.sh $(top_builddir)/UnitTests$(EXEEXT) --verify
|
||||
$(VALGRIND) $(top_builddir)/UnitTests$(EXEEXT) --verify
|
||||
|
||||
######################################################################
|
||||
|
||||
|
|
@ -319,10 +325,14 @@ $(top_builddir)/doc/refman.pdf: $(top_builddir)/doc/html/index.html
|
|||
|
||||
docs: pdf $(top_builddir)/doc/refman.pdf
|
||||
|
||||
fulltest:
|
||||
copy-sources:
|
||||
rsync -av --delete $(srcdir)/ /tmp/ledger/
|
||||
(cd /tmp/ledger; \
|
||||
git clean -x -d -f; \
|
||||
./myacprep --release --build -j3 distcheck)
|
||||
(cd /tmp/ledger; git clean -x -d -f)
|
||||
|
||||
release: copy-sources
|
||||
(cd /tmp/ledger; ./myacprep --release --build -j3)
|
||||
|
||||
release-distcheck: copy-sources
|
||||
(cd /tmp/ledger; ./myacprep --release --build -j3 distcheck)
|
||||
|
||||
# Makefile.am ends here
|
||||
|
|
|
|||
27
configure.ac
27
configure.ac
|
|
@ -1,11 +1,11 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
AC_PREREQ(2.62)
|
||||
|
||||
m4_include([version.m4])
|
||||
|
||||
AC_INIT([ledger],VERSION_NUMBER,[johnw@newartisans.com])
|
||||
AC_INIT([ledger],[VERSION_NUMBER],[johnw@newartisans.com])
|
||||
AC_CONFIG_SRCDIR([src/main.cc])
|
||||
AC_CONFIG_HEADER([acconf.h])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
|
|
@ -16,6 +16,9 @@ AC_PROG_MAKE_SET
|
|||
AC_PROG_LIBTOOL
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AC_CHECK_PROG([VALGRIND_TEST], [valgrind], [true], [false])
|
||||
AM_CONDITIONAL(HAVE_VALGRIND, test x$VALGRIND_TEST = xtrue)
|
||||
|
||||
# Checks for emacs lisp path
|
||||
AM_PATH_LISPDIR
|
||||
|
||||
|
|
@ -123,15 +126,11 @@ if [test x$xml = xtrue ]; then
|
|||
[libexpat_save_libs=$LIBS
|
||||
LIBS="-lexpat $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_LINK(
|
||||
[#include <stdio.h>
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
|
||||
extern "C" {
|
||||
#include <expat.h> // expat XML parser
|
||||
}],
|
||||
[XML_Parser parser = XML_ParserCreate(NULL);
|
||||
return parser != NULL;],
|
||||
[libexpat_avail_cv_=true],
|
||||
[libexpat_avail_cv_=false])
|
||||
}]], [[XML_Parser parser = XML_ParserCreate(NULL);
|
||||
return parser != NULL;]])],[libexpat_avail_cv_=true],[libexpat_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$libexpat_save_libs])
|
||||
|
||||
|
|
@ -153,15 +152,11 @@ if [test x$xml = xtrue ]; then
|
|||
[libxmlparse_save_libs=$LIBS
|
||||
LIBS="-lxmlparse -lxmltok $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_LINK(
|
||||
[#include <stdio.h>
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
|
||||
extern "C" {
|
||||
#include <xmlparse.h> // expat XML parser
|
||||
}],
|
||||
[XML_Parser parser = XML_ParserCreate(NULL);
|
||||
return parser != NULL;],
|
||||
[libxmlparse_avail_cv_=true],
|
||||
[libxmlparse_avail_cv_=false])
|
||||
}]], [[XML_Parser parser = XML_ParserCreate(NULL);
|
||||
return parser != NULL;]])],[libxmlparse_avail_cv_=true],[libxmlparse_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$libxmlparse_save_libs])
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
VALGRIND=$(which valgrind 2>&1)
|
||||
|
||||
if [ -x "$VALGRIND" ]; then
|
||||
exec "$VALGRIND" --leak-check=full --show-reachable=yes "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
Loading…
Add table
Reference in a new issue