(CLEANFILES): Add generated files: ftw.h search.h.
[coreutils.git] / README-valgrind
blobe2e0e980cb1717a6e6f9063827449c5df2cfa409
1 #! /bin/bash
3 # Convert Makefile.am files:
4 # find tests -name Makefile.am \
5 # | xargs grep -wl PATH|xargs perl -pi -e 's,src:\$\$PATH,src/vg:\$\$PATH,'
7 # Create src/vg:
9 coreutils=$(echo 'spy:;@echo $(all_programs)' | (cd src; make -f Makefile -f - spy | tr -s '\n ' ' '))
10 mkdir src/vg
11 pwd=`pwd`
12 up=`dirname $pwd`
13 path='export PATH='$up':${PATH#*:}'
14 pre='#!/bin/sh\n'"$path"'\n'
15 n=9
16 vg='exec /usr/bin/valgrind --quiet --num-callers='$n
17 cat <<EOF > src/vg/gen
18 for i in $coreutils; do
19 printf "$pre$vg \$i"' "\$@"\n' > \$i
20 chmod a+x \$i
21 done
22 EOF
23 cd src/vg
24 . ./gen