summaryrefslogtreecommitdiff
path: root/make_ext.pl
diff options
context:
space:
mode:
authorReini Urban <rurban@x-ray.at>2011-11-24 22:04:20 -0600
committerTony Cook <tony@develop-help.com>2014-07-02 14:57:37 +1000
commit63d4785093422d7ee0a905d78c25f6e1bc24b9bc (patch)
tree8be95c56fc959e8695a5a5fca7d5e8a147907000 /make_ext.pl
parent42484eedeb4abcee1d893010daa67c1a42ec6424 (diff)
downloadperl-63d4785093422d7ee0a905d78c25f6e1bc24b9bc.tar.gz
Support faster make -s
Skip chdir messages by passing make -s through Also silence make_ext.pl to speed up the build process. use -v or --verbose
Diffstat (limited to 'make_ext.pl')
-rw-r--r--make_ext.pl20
1 files changed, 11 insertions, 9 deletions
diff --git a/make_ext.pl b/make_ext.pl
index f10a47c6a3..09d0ab45be 100644
--- a/make_ext.pl
+++ b/make_ext.pl
@@ -51,13 +51,15 @@ my $ext_dirs_re = '(?:' . join('|', @ext_dirs) . ')';
# 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\-]+)=(.*)$/) {
@@ -153,11 +155,11 @@ if ($is_Win32) {
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;
@@ -252,7 +254,7 @@ foreach my $spec (@extspec) {
}
}
- print "\tMaking $mname ($target)\n";
+ print "\tMaking $mname ($target)\n" if $verbose;
build_extension($ext_pathname, $perl, $mname, $target,
[@pass_through, @{$extra_passthrough{$spec} || []}]);
@@ -348,7 +350,7 @@ sub build_extension {
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
@@ -491,7 +493,7 @@ EOM
}
# 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) {
@@ -503,7 +505,7 @@ EOM
}
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;
@@ -529,7 +531,7 @@ else
if test ! -f Makefile ; then
echo "Warning: No Makefile!"
fi
- make $clean_target MAKE='@make' @pass_through
+ make -s $clean_target MAKE='@make' @pass_through
fi
cd $return_dir
EOS
@@ -556,7 +558,7 @@ 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;