Rename phony target envvar-check to evar-check
[coreutils.git] / README-valgrind
blobd3989a743ffa7940934e51bf9523277f5fcd8ae8
1 #! /bin/bash
3 # Fix valgrind script to exec "$@", not some var.
4 # Fix valgrind sources to know about syscall 252, for exit_group
6 # Convert Makefile.am files:
7 # find tests -name Makefile.am \
8 # | xargs grep -wl PATH|xargs perl -pi -e 's,src:\$\$PATH,src/vg:\$\$PATH,'
10 # Create src/vg:
12 coreutils=$(echo 'spy:;@echo $(all_programs)' | (cd src; make -f Makefile -f - spy | tr -s '\n ' ' '))
13 mkdir src/vg
14 pwd=`pwd`
15 up=`dirname $pwd`
16 path='export PATH='$up':${PATH#*:}'
17 pre='#!/bin/sh\n'"$path"'\n'
18 n=9
19 vg='exec /p/bin/valgrind --quiet --num-callers='$n
20 cat <<EOF > src/vg/gen
21 for i in $coreutils; do
22 printf "$pre$vg \$i"' "\$@"\n' > \$i
23 chmod a+x \$i
24 done
25 EOF
26 cd src/vg
27 . ./gen