3 # Convert Makefile.am files:
4 # find tests -name Makefile.am | xargs grep -wl PATH|xargs perl -pi -e \
5 # 's,src(\$\(PATH_SEPARATOR\)\$\$PATH),src/vg$1,'
7 # find tests -name Makefile.am|xargs grep -wl PATH|xargs perl -pi -e 's,src/vg,src,'
9 # Create this symlink for suppressions (this is no longer necessary,
10 # with linux-2.6.9 and valgrind-2.2.0):
11 # ln -s $PWD/.vg-suppressions /tmp/cu-vg
15 coreutils=$(echo 'spy:;@echo $(all_programs)' | (cd src; make -f Makefile -f - spy | tr -s '\n ' ' '))
19 path='export PATH='$srcdir':${PATH#*:}'
20 pre='#!/bin/sh\n'"$path"'\n'
22 vg='exec /usr/bin/valgrind --suppressions=/tmp/cu-vg --log-fd=3 --leak-check=yes --track-fds=yes --quiet --num-callers='$n
23 cat <<EOF > src/vg/gen
24 for i in $coreutils; do
25 printf "$pre$vg \$i"' "\$@"\n' > \$i