summaryrefslogtreecommitdiff
path: root/installperl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-12-24 11:53:02 +0100
committerNicholas Clark <nick@ccl4.org>2012-01-02 12:18:53 +0100
commitefe502bb62e7bd1abd1419fdb2e9edcde3894bc2 (patch)
treeac66844b64cba9aca68449dc04670d1ad0666726 /installperl
parent65016092c02f30665d2b0ab8a4774926f71d0dc7 (diff)
downloadperl-efe502bb62e7bd1abd1419fdb2e9edcde3894bc2.tar.gz
Sanitise NetWare changes to installperl.
Commit 2986a63f7e513cf3's changes to installperl could have been cleaner. Consistently pass $opts{verbose} to all invocations of mkpath(). The skip logic for paths matching /\.(?:nlp|nlm|bs)$/ should have been earlier, and should not have created copy&paste code duplication of the calls to copy_if_diff() and chmod.
Diffstat (limited to 'installperl')
-rwxr-xr-xinstallperl42
1 files changed, 19 insertions, 23 deletions
diff --git a/installperl b/installperl
index 1fc689c1bc..0cd6ec970a 100755
--- a/installperl
+++ b/installperl
@@ -323,13 +323,13 @@ elsif ($^O ne 'dos') {
# If installing onto a NetWare server
if ($nwinstall) {
# Copy perl.nlm, echo.nlm, type.nlm, a2p.nlm & cgi2perl.nlm
- mkpath($Config{installnwsystem}, 1, 0777);
+ mkpath($Config{installnwsystem}, $opts{verbose}, 0777);
copy("netware\\".$ENV{'MAKE_TYPE'}."\\perl.nlm", $Config{installnwsystem});
copy("netware\\testnlm\\echo\\echo.nlm", $Config{installnwsystem});
copy("netware\\testnlm\\type\\type.nlm", $Config{installnwsystem});
copy("x2p\\a2p.nlm", $Config{installnwsystem});
chmod(0755, "$Config{installnwsystem}\\perl.nlm");
- mkpath($Config{installnwlcgi}, 1, 0777);
+ mkpath($Config{installnwlcgi}, $opts{verbose}, 0777);
copy("lib\\auto\\cgi2perl\\cgi2perl.nlm", $Config{installnwlcgi});
}
} #if (!$Is_NetWare)
@@ -762,6 +762,14 @@ sub installlib {
return unless $do_installprivlib;
}
+ if ($Is_NetWare && !$nwinstall && /\.(?:nlp|nlm|bs)$/) {
+ # Don't copy .nlp,.nlm files, doesn't make sense on Windows and also
+ # if copied will give problems when building new extensions.
+ # Has to be copied if we are installing on a NetWare server and
+ # hence the check !$nwinstall
+ return;
+ }
+
if (-f $_) {
if (/\.(?:al|ix)$/ && !($dir =~ m[^auto/(.*)$])) {
$installlib = $installprivlib;
@@ -779,28 +787,16 @@ sub installlib {
mkpath("$installlib/$dir", $opts{verbose}, 0777);
# HP-UX (at least) needs to maintain execute permissions
# on dynamically-loaded libraries.
- if ($Is_NetWare && !$nwinstall) {
- # Don't copy .nlp,.nlm files, doesn't make sense on Windows and also
- # if copied will give problems when building new extensions.
- # Has to be copied if we are installing on a NetWare server and hence
- # the check !$nwinstall
- if (!(/\.(?:nlp|nlm|bs)$/)) {
- copy_if_diff($_, "$installlib/$name")
- and chmod($name =~ /\.(so|$dlext)$/o ? 0555 : 0444,
- "$installlib/$name");
- }
- } else {
- 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");
- }
+ 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");
}
- } #if ($Is_NetWare)
+ }
}
}
}