doc: move @shortcontents and @contents from end to start
[platform/upstream/coreutils.git] / README-valgrind
index eda27b9..12da475 100644 (file)
@@ -1,4 +1,20 @@
 #! /bin/bash
+# Convert this package for use with valgrind.
+
+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Convert Makefile.am files:
 #  find tests -name Makefile.am | xargs grep -wl PATH|xargs perl -pi -e \
@@ -16,13 +32,13 @@ coreutils=$(echo 'spy:;@echo $(all_programs)' | (cd src; make -f Makefile -f - s
 mkdir -p src/vg
 pwd=`pwd`
 srcdir=$pwd/src
-path='export PATH='$srcdir':${PATH#*:}'
-pre='#!/bin/sh\n'"$path"'\n'
-n=9
-vg='exec /usr/bin/valgrind --log-fd=3 --leak-check=yes --track-fds=yes --quiet --num-callers='$n
+_path='export PATH='$srcdir':${PATH#*:}'
+pre='#!/bin/sh\n'"$_path"'\n'
+n=15
+vg='exec /usr/bin/valgrind --suppressions=/tmp/cu-vg --log-fd=3 --leak-check=yes --track-fds=yes --leak-check=full --num-callers='$n
 cat <<EOF > src/vg/gen
 for i in $coreutils; do
-  printf "$pre$vg \$i"' "\$@"\n' > \$i
+  printf "$pre$vg -- \$i"' "\$@"\n' > \$i
   chmod a+x \$i
 done
 EOF