diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-03-23 22:07:59 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-03-23 22:07:59 +0000 |
commit | 9ffcd8612a179e6a837df3e98019ae7fe24b4fa1 (patch) | |
tree | dcafddf02c4334012a4fcffeee5068685ff42b71 /installperl | |
parent | 360aca433d51a01ddd748b8606c6c288bdb2f7fc (diff) | |
parent | 3bdc27670282422f0788ccddd9711ae6cfe9bcd1 (diff) | |
download | perl-9ffcd8612a179e6a837df3e98019ae7fe24b4fa1.tar.gz |
integrate cfgperl changes into mainline
p4raw-id: //depot/perl@3131
Diffstat (limited to 'installperl')
-rwxr-xr-x | installperl | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/installperl b/installperl index ac2cf82241..93b9947d94 100755 --- a/installperl +++ b/installperl @@ -173,6 +173,7 @@ elsif ($^O eq 'mpeix') { elsif ($^O ne 'dos') { safe_unlink("$installbin/$perl$ver$exe_ext"); copy("perl$exe_ext", "$installbin/$perl$ver$exe_ext"); + strip("$installbin/perl$ver$exe_ext") if $^O =~ /^(rhapsody)$; chmod(0755, "$installbin/$perl$ver$exe_ext"); } else { @@ -232,9 +233,14 @@ else { foreach my $file (@corefiles) { # HP-UX (at least) needs to maintain execute permissions # on dynamically-loadable libraries. So we do it for all. - copy_if_diff($file,"$installarchlib/CORE/$file") - and chmod($file =~ /\.(so|\Q$dlext\E)$/ ? 0555 : 0444, - "$installarchlib/CORE/$file"); + if (copy_if_diff($file,"$installarchlib/CORE/$file")) { + if ($file =~ /\.(so|\Q$dlext\E)$/) { + chmod(0555, "$installarchlib/CORE/$file"); + strip("-S", "$installarchlib/CORE/$file") if $^O =~ /^(rhapsody)$; + } else { + chmod(0444, "$installarchlib/CORE/$file"); + } + } } # Install main perl executables @@ -603,3 +609,23 @@ sub copy_if_diff { 1; } } + +sub strip +{ + my(@args) = @_; + + my @opts; + while (@args && $args[0] =~ /^(-\w+)$/) { + push @opts, shift @args; + } + + foreach my $file (@args) { + if (-f $file) { + print STDERR " strip $file\n"; + system("strip", @opts, $file); + } else { + print STDERR "# file '$file' skipped\n"; + } + } +} + |