# It may be deleted in a later release of perl so try to
# avoid using it for other purposes.
-my (%excl, %incl, %opts, @extspec, @pass_through);
+my (%excl, %incl, %opts, @extspec, @pass_through, $verbose);
foreach (@ARGV) {
if (/^!(.*)$/) {
$excl{$1} = 1;
} elsif (/^\+(.*)$/) {
$incl{$1} = 1;
+ } elsif (/^--verbose$/ or /^-v$/) {
+ $verbose = 1;
} elsif (/^--([\w\-]+)$/) {
$opts{$1} = 1;
} elsif (/^--([\w\-]+)=(.*)$/) {
my $pl2bat = "$topdir\\win32\\bin\\pl2bat";
unless (-f "$pl2bat.bat") {
my @args = ($perl, "-I$topdir\\lib", ("$pl2bat.pl") x 2);
- print "@args\n";
+ print "@args\n" if $verbose;
system(@args) unless IS_CROSS;
}
- print "In $build";
+ print "In $build" if $verbose;
foreach my $dir (@dirs) {
chdir($dir) or die "Cannot cd to $dir: $!\n";
(my $ext = Cwd::getcwd()) =~ s{/}{\\}g;
}
}
- print "\tMaking $mname ($target)\n";
+ print "\tMaking $mname ($target)\n" if $verbose;
build_extension($ext_pathname, $perl, $mname, $target,
[@pass_through, @{$extra_passthrough{$spec} || []}]);
return;
}
- print "\nCreating Makefile.PL in $ext_dir for $mname\n";
+ print "\nCreating Makefile.PL in $ext_dir for $mname\n" if $verbose;
my ($fromname, $key, $value);
if ($mname eq 'podlators') {
# We need to special case this somewhere, and this is fewer
}
# We are going to have to use Makefile.PL:
- print "\nRunning Makefile.PL in $ext_dir\n";
+ print "\nRunning Makefile.PL in $ext_dir\n" if $verbose;
my @args = ("-I$lib_dir", 'Makefile.PL');
if ($is_VMS) {
}
push @args, @$pass_through;
_quote_args(\@args) if $is_VMS;
- print join(' ', $perl, @args), "\n";
+ print join(' ', $perl, @args), "\n" if $verbose;
my $code = system $perl, @args;
warn "$code from $ext_dir\'s Makefile.PL" if $code;
if test ! -f Makefile ; then
echo "Warning: No Makefile!"
fi
- make $clean_target MAKE='@make' @pass_through
+ @make $clean_target MAKE='@make' @pass_through
fi
cd $return_dir
EOS
system(@make, @args) and print "@make @args failed, continuing anyway...\n";
}
my @targ = ($target, @$pass_through);
- print "Making $target in $ext_dir\n@make @targ\n";
+ print "Making $target in $ext_dir\n@make @targ\n" if $verbose;
+ local $ENV{PERL_INSTALL_QUIET} = 1;
my $code = system(@make, @targ);
die "Unsuccessful make($ext_dir): code=$code" if $code != 0;
my ($last) = $mname =~ /([^:]+)$/;
my ($first) = $mname =~ /^([^:]+)/;
+ my $pm_to_blib = $is_VMS ? 'pm_to_blib.ts' : 'pm_to_blib';
+
foreach my $leaf (<*>) {
if (-d $leaf) {
+ $leaf =~ s/\.DIR\z//i
+ if $is_VMS;
next if $leaf =~ /\A(?:\.|\.\.|t|demo)\z/;
if ($leaf eq 'lib') {
++$has_lib;
}
return $leaf
unless -f _;
+ $leaf =~ s/\.\z//
+ if $is_VMS;
# Makefile.PL is "safe" to ignore because we will only be called for
# directories that hold a Makefile.PL if they are in the exception list.
next
|Makefile\.PL
|MANIFEST
|META\.yml
- |pm_to_blib
+ |\Q$pm_to_blib\E
|README
|README\.patching
|README\.release
}
# This is running under miniperl, so no autodie
if ($target eq 'all') {
+ local $ENV{PERL_INSTALL_QUIET} = 1;
require ExtUtils::Install;
ExtUtils::Install::pm_to_blib(\%pm, '../../lib/auto');
- open my $fh, '>', 'pm_to_blib'
- or die $!;
+ open my $fh, '>', $pm_to_blib
+ or die "Can't open '$pm_to_blib': $!";
print $fh "$0 has handled pm_to_blib directly\n";
close $fh
- or die $!;
+ or die "Can't close '$pm_to_blib': $!";
if ($is_Unix) {
# Fake the fallback cleanup
my $fallback
# A clean target.
# For now, make the targets behave the same way as ExtUtils::MakeMaker
# does
- _unlink('pm_to_blib');
+ _unlink($pm_to_blib);
unless ($target eq 'clean') {
# but cheat a bit, by relying on the top level Makefile clean target
# to take out our directory lib/auto/...