summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>2002-03-03 21:28:51 -0500
committerAbhijit Menon-Sen <ams@wiw.org>2002-03-04 08:48:11 +0000
commit2b21cd67dc9d2805d732dbf7a8cc0224518df145 (patch)
tree0808b529d507fc2e872483dbd56f046eec2d7062
parent08ff138dc0c1cdf425c051c295eab8d1f59c736a (diff)
downloadperl-2b21cd67dc9d2805d732dbf7a8cc0224518df145.tar.gz
perly-fixer
Message-Id: <20020304022851.A14119@math.ohio-state.edu> p4raw-link: @14577 on //depot/perl: 0ad5258ff3f3328f321188cbb4fcd6a74b365431 p4raw-id: //depot/perl@14987
-rw-r--r--Makefile.SH2
-rwxr-xr-xperly.fixer7
2 files changed, 6 insertions, 3 deletions
diff --git a/Makefile.SH b/Makefile.SH
index 58567bbe19..1d81d1cf40 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -770,7 +770,7 @@ run_byacc: FORCE check_byacc
-e 's/y\.tab/perly/g' perly.c >perly.tmp && mv perly.tmp perly.c
sed -e '/^extern YYSTYPE yy/D' y.tab.h >yh.tmp && mv yh.tmp y.tab.h
cmp -s y.tab.h perly.h && rm -f y.tab.h || mv y.tab.h perly.h
- perl -i perlyline.pl perly.c
+ perl -i.old perlyline.pl perly.c
chmod 664 vms/perly_c.vms vms/perly_h.vms
perl vms/vms_yfix.pl perly.c perly.h vms/perly_c.vms vms/perly_h.vms
diff --git a/perly.fixer b/perly.fixer
index 16ea925144..1c07724e63 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 <perly_c.diff
+ $gnupatch -F3 $output <perly_c.diff
sed -e '/^[ ]*printf("yydebug:/s/printf(/PerlIO_printf(Perl_debug_log, /' \
-e '/^#line /s/"y[.]tab[.]c"/"perly.c"/' \
-e '/\[\] *= *[{]/s/^/static /' \
@@ -57,7 +60,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 <perly.c.dif9
+ $gnupatch -F3 $output <perly.c.dif9
sed -e '/^[ ]*printf("yydebug:/s/printf(/PerlIO_printf(Perl_debug_log, /' \
-e '/^#line /s/"y[.]tab[.]c"/"perly.c"/' \
-e '/\[\] *= *[{]/s/^/static /' \