From: Jarkko Hietaniemi Date: Sun, 25 Nov 2001 02:48:04 +0000 (+0000) Subject: In the MakeMaker pm_to_blib target don't copy all X-Git-Tag: accepted/trunk/20130322.191538~29240 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2fa5cc0d287cd15433ab9335a41b9d14c02edc5;p=platform%2Fupstream%2Fperl.git In the MakeMaker pm_to_blib target don't copy all the files in one fell swoop, deal with them hunkwise, helps for CLIs with limited line lengths. (This seems to help for DJGPP building Encode, where there are dozens of files to copy.) p4raw-id: //depot/perl@13251 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 8370f21..16c6e6f 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -3072,12 +3072,31 @@ destination and autosplits them. See L sub pm_to_blib { my $self = shift; my($autodir) = $self->catdir('$(INST_LIB)','auto'); - return q{ + my $r = q{ pm_to_blib: $(TO_INST_PM) - }.$self->{NOECHO}.q{$(PERLRUNINST) -MExtUtils::Install \ - -e "pm_to_blib({qw{$(PM_TO_BLIB)}},'}.$autodir.q{','$(PM_FILTER)')" - }.$self->{NOECHO}.q{$(TOUCH) $@ }; + my %pm_to_blib = %{$self->{PM}}; + my @a; + my $l; + sub _pm_to_blib_flush { + $r .= +q{ }.$self->{NOECHO}.q[$(PERLRUNINST) -MExtUtils::Install \ + -e "pm_to_blib({qw{].qq[@a].q[}},'].$autodir.q{','$(PM_FILTER)')" +}; + @a = (); + $l = 0; + } + while (my ($pm, $blib) = each %pm_to_blib) { + my $la = length $pm; + my $lb = length $blib; + if ($l + $la + $lb + @a / 2 > 200) { + _pm_to_blib_flush(); + } + push @a, $pm, $blib; + $l += $la + $lb; + } + _pm_to_blib_flush(); + return $r.q{ }.$self->{NOECHO}.q{$(TOUCH) $@}; } =item post_constants (o)