Commit 19a0cda9 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(valgrind.wrap): New target. Since valgrind can only send the log to

	a specified file descriptor, and expect cannot open a
	specified file descriptor, we have to use a wrapper for
	valgrind.
(noinst_DATA): Added valgrind.exp.
(MOSTLYCLEANFILES): Added valgrind-*.log, valgrind.log and valgrind.wrap.
(check-l2g): Depend on valgrind.wrap.
(check-lyskomd): Ditto.
(check-leaks): Ditto.
parent 89d8c3e3
# $Id: Makefile.am,v 1.38 2002/08/02 12:03:40 ceder Exp $
# $Id: Makefile.am,v 1.39 2002/08/02 13:12:01 ceder Exp $
# Copyright (C) 1998-2001 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
......@@ -27,7 +27,7 @@ RM = rm -f
check_PROGRAMS = test-l2g
noinst_DATA = site.exp .gdbinit
noinst_DATA = site.exp .gdbinit valgrind.wrap
EXTRA_DIST = .cvsignore \
tcpconnect.py renumber.el \
......@@ -52,7 +52,8 @@ EXTRA_DIST = .cvsignore \
MOSTLYCLEANFILES = .gdbinit site.exp *.sum *.log usage-base.tmp usage.all \
lyskomd.*.usage lyskomd.*.base *.da *.bb *.gcov *.bbg
lyskomd.*.usage lyskomd.*.base *.da *.bb *.gcov *.bbg \
valgrind-*.log valgrind.log valgrind.wrap
mostlyclean-local:
$(RM) -r -f db etc
......@@ -90,10 +91,10 @@ top_srcdir = @top_srcdir@
check: check-l2g check-lyskomd check-leaks
check-l2g: test-l2g site.exp
check-l2g: test-l2g site.exp valgrind.wrap
runtest --tool l2g --srcdir $(srcdir)
check-lyskomd: site.exp ../lyskomd
check-lyskomd: site.exp ../lyskomd valgrind.wrap
runtest --tool lyskomd --srcdir $(srcdir) \
3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-
......@@ -102,7 +103,7 @@ check-lyskomd: site.exp ../lyskomd
# "make check" in lyskomd.0.
check-lyskomd: check-recursive
check-leaks: site.exp ../lyskomd
check-leaks: site.exp ../lyskomd valgrind.wrap
runtest --tool leaks --srcdir $(srcdir) \
3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&-
......@@ -116,3 +117,13 @@ site.exp: Makefile
else \
echo "set valgrind \"\"" >> site.exp ; \
fi
valgrind.wrap: Makefile
$(RM) $@ $@.tmp
echo "#!/bin/sh" > $@.tmp
echo "# This file is generated by Makefile. Do not edit." >> $@.tmp
# If you change the "25", you also have to change config/unix.exp.
echo "exec 25>valgrind.log" >> $@.tmp
echo 'exec $(VALGRIND) "$$@"' >> $@.tmp
chmod 555 $@.tmp
mv $@.tmp $@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment