X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=installperl;h=a9e7b9eb14b110241bb0edd94105cf4b47de417b;hb=4915ea7517996db0baece3f93a36975a09cc77b8;hp=86d9c2c6303a25b0dde32284a551de6135734979;hpb=33bd2d8f0a8d0bccb1393938cc94ab135b31928f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/installperl b/installperl index 86d9c2c..a9e7b9e 100755 --- a/installperl +++ b/installperl @@ -10,7 +10,7 @@ BEGIN { use strict; my ($Is_VMS, $Is_W32, $Is_OS2, $Is_Cygwin, $Is_Darwin, $nonono, $dostrip, $versiononly, $silent, $verbose, - $otherperls, $archname,$Is_NetWare, $nwinstall); + $otherperls, $archname,$Is_NetWare, $nwinstall, $nopods); use vars qw /$depth/; BEGIN { @@ -72,6 +72,7 @@ while (@ARGV) { $verbose = 1 if $ARGV[0] eq '-V' || $ARGV [0] eq '-n'; $archname = 1 if $ARGV[0] eq '-A'; $nwinstall = 1 if $ARGV[0] eq '-netware'; + $nopods = 1 if $ARGV[0] eq '-p'; if ($ARGV[0] eq '-?' or $ARGV[0] =~ /^-?-h/) { print <<"EOT"; Usage $0: [switches] @@ -86,6 +87,7 @@ Usage $0: [switches] -V Verbose mode. -A Also install perl with the architecture's name in the perl binary's name. + -p Don't install the pod files. [This will break use diagnostics;] -netware Install correctly on a Netware server. EOT exit; @@ -111,17 +113,18 @@ close SCRIPTS; if ($scr_ext) { @scripts = map { "$_$scr_ext" } @scripts; } -my @pods = (); +my @pods = () unless $nopods; # Specify here any .pm files that are actually architecture-dependent. # (Those included with XS extensions under ext/ are automatically # added later.) # Now that the default privlib has the full perl version number included, -# we no longer have to play the trick of sticking version-specific .pm +# we no longer have to play the trick of sticking version-specific .pm # files under the archlib directory. my %archpms = ( - Config => 1, - lib => 1, + Config => 1, + lib => 1, + Cwd => 1, ); if ($^O eq 'dos') { @@ -252,7 +255,7 @@ if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin) { safe_unlink("$installbin/$perldll"); copy("$perldll", "$installbin/$perldll"); chmod(0755, "$installbin/$perldll"); - + } # if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin) # This will be used to store the packlist @@ -314,7 +317,7 @@ if ($d_dosuid) { # Install library files. my ($do_installarchlib, $do_installprivlib) = (0, 0); - + mkpath($installprivlib, $verbose, 0777); mkpath($installarchlib, $verbose, 0777); mkpath($installsitelib, $verbose, 0777) if ($installsitelib); @@ -383,7 +386,7 @@ if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VM "$installbin/$perl$exe_ext"); } link("$installbin/s$perl_verbase$ver$exe_ext", - "$installbin/suid$perl$exe_ext") + "$installbin/suid$perl$exe_ext") if $d_dosuid; } @@ -425,11 +428,7 @@ if ($Config{installusrbinperl} && $Config{installusrbinperl} eq 'define' && (-l $usrbinperl) && ((readlink $usrbinperl) eq $expinstperl)); } - if ((! $mainperl_is_instperl) && - (yn("Many scripts expect perl to be installed as $usrbinperl.\n" . - "Do you wish to have $usrbinperl be the same as\n" . - "$expinstperl? [y] "))) - { + if (! $mainperl_is_instperl) { unlink($usrbinperl); ( $Config{'d_link'} eq 'define' && eval { CORE::link $instperl, $usrbinperl } ) || @@ -466,7 +465,7 @@ sub script_alias { safe_unlink("$installscript/$alias$scr_ext"); if ($^O eq 'dos' or $Is_VMS or $^O eq 'transit') { copy("$installscript/$orig$scr_ext", - "$installscript/$alias$scr_ext"); + "$installscript/$alias$scr_ext"); } else { link("$installscript/$orig$scr_ext", "$installscript/$alias$scr_ext"); @@ -483,7 +482,7 @@ if ($versiononly) { chmod(0755, "$installscript/$base"); } - for (@tolink) { + for (@tolink) { my ($from, $to) = map { "$_$ver" } @$_; (my $frbase = $from) =~ s#.*/##; (my $tobase = $to) =~ s#.*/##; @@ -496,7 +495,7 @@ if ($versiononly) { chmod(0755, "$installscript/$base"); } - for (@tolink) { + for (@tolink) { my ($from, $to) = @$_; (my $frbase = $from) =~ s#.*/##; (my $tobase = $to) =~ s#.*/##; @@ -603,7 +602,7 @@ sub unlink { next unless -e $name; chmod 0777, $name if ($Is_OS2 || $Is_W32 || $Is_Cygwin || $Is_NetWare); print " unlink $name\n" if $verbose; - ( CORE::unlink($name) and ++$cnt + ( CORE::unlink($name) and ++$cnt or warn "Couldn't unlink $name: $!\n" ) unless $nonono; } return $cnt; @@ -633,7 +632,7 @@ sub safe_rename { for ($i = 1; $i < 50; $i++) { last if rename($to, "$to.$i"); } - warn("Cannot rename to `$to.$i': $!"), return 0 + warn("Cannot rename to `$to.$i': $!"), return 0 if $i >= 50; # Give up! } link($from,$to) || return 0; @@ -717,7 +716,7 @@ sub installlib { $File::Find::prune = 1; return; } - + # ignore patch backups, RCS files, emacs backup & temp files and the # .exists files, .PL files, and .t files. return if $name =~ m{\.orig$|~$|^#.+#$|,v$|^\.exists|\.PL$|\.t$};