diff options
-rwxr-xr-x | bin/manilist.SH | 3 | ||||
-rwxr-xr-x | bin/perload | 6 | ||||
-rwxr-xr-x | jmake/jmake.SH | 6 | ||||
-rw-r--r-- | mcon/pl/cosmetic.pl | 18 | ||||
-rw-r--r-- | mcon/pl/makefile.pl | 12 | ||||
-rwxr-xr-x | pat/patlog.SH | 8 | ||||
-rwxr-xr-x | pat/patmake.SH | 10 |
7 files changed, 23 insertions, 40 deletions
diff --git a/bin/manilist.SH b/bin/manilist.SH index 75dd073..1bb8f3f 100755 --- a/bin/manilist.SH +++ b/bin/manilist.SH @@ -472,8 +472,7 @@ EOF # Remove ':' quotations in front of the lines sub q { local($_) = @_; - local($*) = 1; - s/^://g; + s/^://gm; $_; } diff --git a/bin/perload b/bin/perload index 2354790..e71cbdd 100755 --- a/bin/perload +++ b/bin/perload @@ -273,8 +273,7 @@ if (@Data > 0) { : unless seek(main'DATA, $pos, 0); : local($/) = "\n}"; : local($body) = scalar(<main'DATA>); -: local($*) = 1; -: die "End of file found while loading $_[0].\n" unless $body =~ /^\}$/; +: die "End of file found while loading $_[0].\n" unless $body =~ /^\}$/m; EOC if ($opt_t) { print &q(<<'EOC'); @@ -462,8 +461,7 @@ sub flush_comment { sub q { local($_) = @_; - local($*) = 1; - s/^://g; + s/^://gm; $_; } diff --git a/jmake/jmake.SH b/jmake/jmake.SH index 3f676b2..bdb5de7 100755 --- a/jmake/jmake.SH +++ b/jmake/jmake.SH @@ -143,13 +143,11 @@ while (<CPP>) { s/@!\s?/\n/g; s/@@\s?/\n\t/g; - $* = 1; # A '\r' is added to all lines, in order to let 'split' keep them # As lines ending with '\' won't fit in the next regular # expression (why ?), we have to treat that special case separately - s/\n$/\r\n/g; - s/\\\s*$/\\\r/g; # Remove spaces after final '\' and add '\r' - $* = 0; + s/\n$/\r\n/gm; + s/\\\s*$/\\\r/gm; # Remove spaces after final '\' and add '\r' @macro = split(/\n/); for ($i = 0; $i <= $#macro; $i++) { chop($_ = $macro[$i]); # Remove final '\r' diff --git a/mcon/pl/cosmetic.pl b/mcon/pl/cosmetic.pl index bfb9575..d8b535b 100644 --- a/mcon/pl/cosmetic.pl +++ b/mcon/pl/cosmetic.pl @@ -47,26 +47,22 @@ sub cosmetic_update { $/ = "\n"; close NEWMANI; - $* = 1; # Multi-line matching - - &mani_add('Configure', 'Portability tool', $spaces) unless /^Configure\b/; + &mani_add('Configure', 'Portability tool', $spaces) unless /^Configure\b/m; &mani_add('config_h.SH', 'Produces config.h', $spaces) - unless /^config_h\.SH\b/ || !-f 'config_h.SH'; + unless /^config_h\.SH\b/m || !-f 'config_h.SH'; &mani_add('confmagic.h', 'Magic symbol remapping', $spaces) - if $opt_M && !/^confmagic\.h\b/; + if $opt_M && !/^confmagic\.h\b/m; - &mani_remove('config_h.SH') if /^config_h\.SH\b/ && !-f 'config_h.SH'; - &mani_remove('confmagic.h') if /^confmagic.h\b/ && !$opt_M; + &mani_remove('config_h.SH') if /^config_h\.SH\b/m && !-f 'config_h.SH'; + &mani_remove('confmagic.h') if /^confmagic.h\b/m && !$opt_M; if ($opt_G) { # Want a GNU-like configure wrapper &add_configure; &mani_add('configure', 'GNU configure-like wrapper', $spaces) - if !/^configure\s/ && -f 'configure'; + if !/^configure\s/m && -f 'configure'; } else { - &mani_remove('configure') if /^configure\s/ && !-f 'configure'; + &mani_remove('configure') if /^configure\s/m && !-f 'configure'; } - - $* = 0; } # Add file to MANIFEST.new, with properly indented comment diff --git a/mcon/pl/makefile.pl b/mcon/pl/makefile.pl index 290c995..434fbeb 100644 --- a/mcon/pl/makefile.pl +++ b/mcon/pl/makefile.pl @@ -90,15 +90,13 @@ sub build_private { print MAKEFILE "SHELL = /bin/sh\n"; print MAKEFILE "W = $wanted\n"; $saved_dependencies = $dependencies; - $* = 1; foreach $sym (@Cond) { if ($symwanted{$sym}) { - $dependencies =~ s/\+($sym\s)/$1/g; + $dependencies =~ s/\+($sym\s)/$1/gm; } else { - $dependencies =~ s/\+$sym(\s)/$1/g; + $dependencies =~ s/\+$sym(\s)/$1/gm; } } - $* = 0; print MAKEFILE $dependencies; close MAKEFILE; } @@ -161,15 +159,13 @@ sub update_makefile { open(MAKEFILE,">Makefile") || die "Can't create .MT/Makefile.\n"; print MAKEFILE "SHELL = /bin/sh\n"; print MAKEFILE "W = $wanted\n"; - $* = 1; foreach $sym (@Cond) { if ($symwanted{$sym}) { - $saved_dependencies =~ s/\+($sym\s)/$1/g; + $saved_dependencies =~ s/\+($sym\s)/$1/gm; } else { - $saved_dependencies =~ s/\+$sym(\s)/$1/g; + $saved_dependencies =~ s/\+$sym(\s)/$1/gm; } } - $* = 0; print MAKEFILE $saved_dependencies; close MAKEFILE; } diff --git a/pat/patlog.SH b/pat/patlog.SH index eb3fdfa..ad3fbd3 100755 --- a/pat/patlog.SH +++ b/pat/patlog.SH @@ -103,12 +103,10 @@ if (-s ".logs$bnum") { } } close LOGS; - $* = 1; $subj = $logs; - $logs =~ s/^patch\d+:\s*/\t/g; - $logs =~ s/\n/\n\n/g; - $subj =~ s/^patch\d+:\s*/Subject: /g; - $* = 0; + $logs =~ s/^patch\d+:\s*/\t/gm; + $logs =~ s/\n/\n\n/gm; + $subj =~ s/^patch\d+:\s*/Subject: /gm; } else { $subj = "Subject: \n"; } diff --git a/pat/patmake.SH b/pat/patmake.SH index 0ff82fd..3d476f1 100755 --- a/pat/patmake.SH +++ b/pat/patmake.SH @@ -107,15 +107,13 @@ if ($#ARGV > 0) { $mf .= $_ if /^[a-z.]+\s*:/; # Rules in makefile } } -$* = 1; $after = ''; $after .= "\t\tConfigure -ders\n" if -f 'Configure'; -$after .= "\t\tmake depend\n" if $mf =~ /^depend:/; +$after .= "\t\tmake depend\n" if $mf =~ /^depend:/m; $after .= "\t\tmake\n" if $mf; -$after .= "\t\tmake test\n" if $mf =~ /^test:/; -$after .= "\t\tmake install\n" if $mf =~ /^install:/; -$after .= "\t\tmake install.man\n" if $mf =~ /^install\.man:/; -$* = 0; +$after .= "\t\tmake test\n" if $mf =~ /^test:/m; +$after .= "\t\tmake install\n" if $mf =~ /^install:/m; +$after .= "\t\tmake install.man\n" if $mf =~ /^install\.man:/m; chdir 'bugs' if -d 'bugs'; die "$progname: patch #$bnum already exists.\n" if -f "patch$bnum"; |