diff options
author | rmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af> | 2008-01-04 23:14:00 +0000 |
---|---|---|
committer | rmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af> | 2008-01-04 23:14:00 +0000 |
commit | 1e7ef113b85f4e4e10ffaa2c3f362645a7c7eecf (patch) | |
tree | 64777fbe1a0b811e9a8ffb66231b2b3966e59608 /mcon | |
parent | 3917f89474931cf825dd53e6bf00665992b9049b (diff) |
Applied diff from H.Merijn Brand to keep it working with perl 5.10, which
no longer supports the old $* perl4 variable to request multiline matching.
git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@20 190e5f8e-a817-0410-acf6-e9863daed9af
Diffstat (limited to 'mcon')
-rw-r--r-- | mcon/pl/cosmetic.pl | 18 | ||||
-rw-r--r-- | mcon/pl/makefile.pl | 12 |
2 files changed, 11 insertions, 19 deletions
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; } |