summaryrefslogtreecommitdiff
path: root/installperl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-12-24 13:40:24 +0100
committerNicholas Clark <nick@ccl4.org>2012-01-02 12:18:53 +0100
commit3a548b368f8077e458c567bba559d5cf3fac9cbe (patch)
tree142fb17f786ee299bbb878e382c0e70d9149fbe0 /installperl
parentefe502bb62e7bd1abd1419fdb2e9edcde3894bc2 (diff)
downloadperl-3a548b368f8077e458c567bba559d5cf3fac9cbe.tar.gz
In installperl, simplify the strip/chmod code for libraries on Darwin.
Diffstat (limited to 'installperl')
-rwxr-xr-xinstallperl11
1 files changed, 3 insertions, 8 deletions
diff --git a/installperl b/installperl
index 0cd6ec970a..7b122a0e00 100755
--- a/installperl
+++ b/installperl
@@ -788,14 +788,9 @@ sub installlib {
# HP-UX (at least) needs to maintain execute permissions
# on dynamically-loaded libraries.
if (copy_if_diff($_, "$installlib/$name")) {
- if ($name =~ /\.(so|$dlext)$/o) {
- strip("-S", "$installlib/$name") if $^O =~ /^(rhapsody|darwin)$/;
- chmod(0555, "$installlib/$name");
- } else {
- strip("-S", "$installlib/$name")
- if ($name =~ /\.a$/o and $^O =~ /^(rhapsody|darwin)$/);
- chmod(0444, "$installlib/$name");
- }
+ strip("-S", "$installlib/$name")
+ if $^O =~ /^(rhapsody|darwin)$/ and /\.(?:so|$dlext|a)$/;
+ chmod(/\.(so|$dlext)$/ ? 0555 : 0444, "$installlib/$name");
}
}
}