X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perly.fixer;h=31e0171e242e8509b0b5dc93321e446c938c73d5;hb=b13c494218827599481238f7c7f4125dd056dce1;hp=16ea92514430919848f0d31eb8abd418fa2bcbc1;hpb=7b57b0ead8ab6b3f08be8b4ded2364d260db25a1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perly.fixer b/perly.fixer index 16ea925..31e0171 100755 --- a/perly.fixer +++ b/perly.fixer @@ -18,6 +18,9 @@ # Also edit some practices gcc -Wall finds questionable. # +gnupatch=patch +. ./config.sh + input=$1 output=$2 tmp=/tmp/f$$ @@ -37,7 +40,7 @@ if grep 'yaccpar 1.8 (Berkeley)' $input >/dev/null 2>&1; then cp $input $output # Don't expect the diff to do everything -- do some by hand if test -f perly_c.diff; then - patch -F3 $output /dev/null 2>&1; then -e 's/^yynewerror:$//' \ -e 's/^ goto yynewerror;//' \ -e 's|^static char yysccsid\(.*\)|/* static char yysccsid\1 */|' \ + -e 's|deprecate(|deprecate_old(|' \ < $output > $tmp && mv -f $tmp $output || exit 1 rm -rf $input echo "If you need to debug perly.c, you need to fix up the #line" @@ -57,7 +61,7 @@ if grep 'yaccpar 1.8 (Berkeley)' $input >/dev/null 2>&1; then exit elif grep 'yaccpar 1.9 (Berkeley)' $input >/dev/null 2>&1; then if test -f perly.c.dif9; then - patch -F3 $output /dev/null 2>&1; then -e 's/^yynewerror:$//' \ -e 's/^ goto yynewerror;//' \ -e 's|^static char yysccsid\(.*\)|/* static char yysccsid\1 */|' \ + -e 's|deprecate(|deprecate_old(|' \ < $output > $tmp && mv -f $tmp $output || exit 1 rm -rf $input echo "If you need to debug perly.c, you need to fix up the #line"