push(@scripts, map("$_.exe", @scripts));
}
-find(sub {
- if ("$File::Find::dir/$_" =~ m{^ext\b(.*)/([^/]+)\.pm$}) {
- my($path, $modname) = ($1,$2);
+# Exclude nonxs extensions that are not architecture dependent
+my @nonxs = grep(!/^Errno$/, split(' ', $Config{'nonxs_ext'}));
- # strip to optional "/lib", or remove trailing component
- $path =~ s{.*/lib\b}{} or $path =~ s{/[^/]*$}{};
+my @ext_dirs = qw(cpan dist ext);
+foreach my $ext_dir (@ext_dirs) {
+ find(sub {
+ if (($File::Find::name =~ m{^$ext_dir\b(.*)/([^/]+)\.pm$}) &&
+ ! grep { (my $dir = $_) =~ s/\//-/g;
+ $File::Find::name =~ /^$ext_dir\/$dir\// } @nonxs)
+ {
+ my($path, $modname) = ($1,$2);
- # strip any leading /
- $path =~ s{^/}{};
+ # Change hypenated name like Filter-Util-Call to nested
+ # directory name Filter/Util/Call
+ $path =~ s{-}{/}g;
- # reconstitute canonical module name
- $modname = "$path/$modname" if length $path;
+ # strip to optional "/lib", or remove trailing component
+ $path =~ s{.*/lib\b}{} or $path =~ s{/[^/]*$}{};
- # remember it
- $archpms{$modname} = 1;
- }
-}, 'ext');
+ # strip any leading /
+ $path =~ s{^/}{};
+
+ # reconstitute canonical module name
+ $modname = "$path/$modname" if length $path;
+
+ # remember it
+ $archpms{$modname} = 1;
+ }
+ }, $ext_dir);
+}
# print "[$_]\n" for sort keys %archpms;
$installsitelib = $Config{installnwlib};
}
-my $d_dosuid = $Config{d_dosuid};
my $binexp = $Config{binexp};
if ($Is_VMS) { # Hang in there until File::Spec hits the big time
# Do some quick sanity checks.
-if (!$opts{notify} && $d_dosuid && $>) { die "You must run as root to install suidperl\n"; }
-
$installbin || die "No installbin directory in config.sh\n";
-d $installbin || mkpath($installbin, $opts{verbose}, 0777);
-d $installbin || $opts{notify} || die "$installbin is not a directory\n";
-x $dbg . 'perl' . $exe_ext || die "${dbg}perl$exe_ext isn't executable!\n";
}
}
--x 'suidperl' . $exe_ext|| die "suidperl isn't executable!\n" if $d_dosuid;
-f 't/rantests' || $Is_W32
|| warn "WARNING: You've never run 'make test' or",
copy("perl.exe", "$installbin/$perl.exe");
}
-safe_unlink("$installbin/s$perl_verbase$ver$exe_ext");
-if ($d_dosuid) {
- copy("suidperl$exe_ext", "$installbin/s$perl_verbase$ver$exe_ext");
- chmod(04711, "$installbin/s$perl_verbase$ver$exe_ext");
-}
-
# Install library files.
my ($do_installarchlib, $do_installprivlib) = (0, 0);
link("$installbin/$perl_verbase$ver$exe_ext",
"$installbin/$perl$exe_ext");
}
- link("$installbin/$perl_verbase$ver$exe_ext",
- "$installbin/suid$perl$exe_ext")
- if $d_dosuid;
}
# For development purposes it can be very useful to have multiple perls
if ( !$versiononly || ($installprivlib =~ m/\Q$vershort/)) {
mkpath("${installprivlib}/$pod", $opts{verbose}, 0777);
- # If Perl 5.003's perldiag.pod is there, rename it.
- if (open POD, "${installprivlib}/$pod/perldiag.pod") {
- read POD, $_, 4000;
- close POD;
- # Some of Perl 5.003's diagnostic messages ended with periods.
- if (/^=.*\.$/m) {
- my ($from, $to) = ("${installprivlib}/$pod/perldiag.pod",
- "${installprivlib}/$pod/perldiag-5.003.pod");
- print " rename $from $to";
- rename($from, $to)
- or warn "Couldn't rename $from to $to: $!\n"
- unless $opts{notify};
- }
- }
-
for (@pods) {
# $_ is a name like pod/perl.pod
(my $base = $_) =~ s#.*/##;
next unless m,^/,;
# Use &samepath here because some systems have other dirs linked
# to $mainperldir (like SunOS)
+ next unless -d;
next if samepath($_, $binexp);
next if samepath($_, cwd());
next if ($mainperl_is_instperl && samepath($_, $mainperldir));
# ignore patch backups, RCS files, emacs backup & temp files and the
# .exists files, .PL files, and test files.
- return if $name =~ m{\.orig$|\.rej$|~$|^#.+#$|,v$|^\.exists|\.PL$|\.plc$|\.t$|^test\.pl$|^dbm_filter_util.pl$} ||
+ return if $name =~ m{\.orig$|\.rej$|~$|^#.+#$|,v$|^\.exists|\.PL$|\.plc$|\.t$|^test\.pl$|^dbm_filter_util\.pl$|^filter-util\.pl$|^uupacktool\.pl$|^\.gitignore$} ||
$dir =~ m{/t(?:/|$)};
# ignore the cpan script in lib/CPAN/bin, the instmodsh and xsubpp
# scripts in lib/ExtUtils, the prove script in lib/Test/Harness,
$name = "$dir/$name" if $dir ne '';
+ return if $name eq 'ExtUtils/XSSymSet.pm' and !$Is_VMS;
+
my $installlib = $installprivlib;
- if ($dir =~ /^auto/ ||
+ if ($dir =~ /^auto\// ||
($name =~ /^(.*)\.(?:pm|pod)$/ && $archpms{$1}) ||
($name =~ /^(.*)\.(?:h|lib)$/i && ($Is_W32 || $Is_NetWare)) ||
- $name eq 'Config_heavy.pl'
+ $name=~/^Config_(heavy|git)\.pl\z/
) {
$installlib = $installarchlib;
return unless $do_installarchlib;