summaryrefslogtreecommitdiff
path: root/installperl
diff options
context:
space:
mode:
authorWilfredo Sánchez <wsanchez@mit.edu>1998-11-13 09:11:30 -0800
committerJarkko Hietaniemi <jhi@iki.fi>1999-03-15 16:58:12 +0000
commit8f1f23e8b15dc90b39e5be39711437f27f72b526 (patch)
treebc78b5dc448e822a2e12ae061a3f6d07268b72ad /installperl
parente3d0d1b96b2c9ea39a8c9ab1faca9d150105b22d (diff)
downloadperl-8f1f23e8b15dc90b39e5be39711437f27f72b526.tar.gz
First pass of integrating the Rhapsody port,
Subject: Keeping the world in sync. Reply-To: wsanchez@apple.com To: perlbug@perl.com Message-Id: <199811140111.RAA41784@scv4.apple.com> p4raw-id: //depot/cfgperl@3108
Diffstat (limited to 'installperl')
-rwxr-xr-xinstallperl32
1 files changed, 29 insertions, 3 deletions
diff --git a/installperl b/installperl
index 006a5506ed..417357b96f 100755
--- a/installperl
+++ b/installperl
@@ -172,6 +172,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 {
@@ -231,9 +232,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
@@ -602,3 +608,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";
+ }
+ }
+}
+