mirror of
https://github.com/coreutils/coreutils.git
synced 2024-12-12 19:34:40 +08:00
28 lines
685 B
Bash
28 lines
685 B
Bash
#! /bin/bash
|
|
|
|
# Fix valgrind script to exec "$@", not some var.
|
|
# Fix valgrind sources to know about syscall 252, for exit_group
|
|
|
|
# Convert Makefile.am files:
|
|
# find tests -name Makefile.am \
|
|
# | xargs grep -wl PATH|xargs perl -pi -e 's,src:\$\$PATH,src/vg:\$\$PATH,'
|
|
|
|
# Create src/vg:
|
|
|
|
coreutils=$(echo 'spy:;@echo $(all_programs)' | (cd src; make -f Makefile -f - spy | tr -s '\n ' ' '))
|
|
mkdir src/vg
|
|
pwd=`pwd`
|
|
up=`dirname $pwd`
|
|
path='export PATH='$up':${PATH#*:}'
|
|
pre='#!/bin/sh\n'"$path"'\n'
|
|
n=9
|
|
vg='exec /p/bin/valgrind --quiet --num-callers='$n
|
|
cat <<EOF > src/vg/gen
|
|
for i in $coreutils; do
|
|
printf "$pre$vg \$i"' "\$@"\n' > \$i
|
|
chmod a+x \$i
|
|
done
|
|
EOF
|
|
cd src/vg
|
|
. ./gen
|