diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-08-25 00:07:30 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-08-25 00:07:30 +0000 |
commit | 15792f6409128aacebc975e996c087326844dfd3 (patch) | |
tree | 04f494366a68815efc31103404955a41162db48e /installperl | |
parent | cd1469e6ff23dfcb7bd15e901e661729d545a720 (diff) | |
download | perl-15792f6409128aacebc975e996c087326844dfd3.tar.gz |
perl 5.003_03: installperl
Simplify installation of shared libperl.so.
Avoid reaching Command Failed!!! with /usr/bin/perl.
Diffstat (limited to 'installperl')
-rwxr-xr-x | installperl | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/installperl b/installperl index b79ca58483..5632824312 100755 --- a/installperl +++ b/installperl @@ -43,9 +43,7 @@ $installsitelib = $Config{installsitelib}; $installsitearch = $Config{installsitearch}; $installman1dir = $Config{installman1dir}; $man1ext = $Config{man1ext}; -# Did we build libperl as a shared library? -$d_shrplib = $Config{d_shrplib}; -$shrpdir = $Config{shrpdir}; +$libperl = $Config{libperl}; # Shared library and dynamic loading suffixes. $so = $Config{so}; $dlext = $Config{dlext}; @@ -69,17 +67,6 @@ if ($d_dosuid && $>) { die "You must run as root to install suidperl\n"; } -x 't/TEST' || warn "WARNING: You've never run 'make test'!!!", " (Installing anyway.)\n"; -if ($d_shrplib) { - if (!<libperl*.$so*>) { - warn "WARNING: Can't find libperl*.$so* to install into $shrpdir.", - " (Installing other things anyway.)\n"; - } else { - mkpath($shrpdir, 1, 0777); - -w $shrpdir || $nonono || die "$shrpdir is not writable by you\n"; - &cmd("cp libperl*.$so* $shrpdir"); - } -} - # First we install the version-numbered executables. &safe_unlink("$installbin/perl$ver$exe_ext"); @@ -215,9 +202,9 @@ if (-w $mainperldir && ! &samepath($mainperldir, $installbin) && !$nonono) { "$binexp/perl? [y] "))) { unlink("$mainperldir/perl$exe_ext"); - eval 'link("$installbin/perl$exe_ext", "$mainperldir/perl$exe_ext")' || - eval 'symlink("$binexp/perl$exe_ext", "$mainperldir/perl$exe_ext")' || - &cmd("cp $installbin/perl$exe_ext $mainperldir$exe_ext"); + CORE::link("$installbin/perl$exe_ext", "$mainperldir/perl$exe_ext") || + symlink("$binexp/perl$exe_ext", "$mainperldir/perl$exe_ext") || + cmd("cp $installbin/perl$exe_ext $mainperldir$exe_ext"); $mainperl_is_instperl = 1; } } @@ -321,16 +308,18 @@ sub rename { } sub link { - local($from,$to) = @_; + my($from,$to) = @_; + my($success) = 0; print STDERR " ln $from $to\n"; eval { - CORE::link($from,$to) || warn "Couldn't link $from to $to: $!\n" unless $nonono; + CORE::link($from,$to) ? $success++ : warn "Couldn't link $from to $to: $!\n" unless $nonono; }; if ($@) { - system( $cp, $from, $to ) - && warn "Couldn't copy $from to $to: $!\n" unless $nonono; + system( $cp, $from, $to )==0 ? $success++ : + warn "Couldn't copy $from to $to: $!\n" unless $nonono; } + $success; } sub chmod { |