The Encode Makefile.PL is recently much-improved in portability, but its
file globbing creates lines in the makefile that are much too long for DCL,
the OpenVMS shell language. The patch below shortens those lines to 128
characters. DCL could handle 255, but as long as we're shortening, I figure
make them more human-readable. The patch assumes that a backslash at the
end of a line is a valid continuation character in all supported make
utilities -- is that a safe asssumption?
Ideally issues like this would be handled in the MM_xxx modules, but since
the lines in question are being created on the fly by the postamble routine,
that would place a rather heavy parsing burden on MakeMaker. I'm open to
suggestion if someone thinks there is a better way to do this.
With this patch, the Encode module passes all tests when run individually,
but fails when run within the test suite, almost certainly because there are
a number of debugging messages of the form:
Loading ../lib/Encode/ascii.enc at ../lib/Encode.pm line 381, <$fh> line 2.
that are not preceded by a '#'. All other tests pass successfully using a
-des build of 8269 with Compaq C V6.2-007 on OpenVMS Alpha V7.2-1.
--- ext/Encode/Makefile.PL;-0 Thu Dec 28 13:40:31 2000
+++ ext/Encode/Makefile.PL Sat Dec 30 20:04:25 2000
@@ -74,15 +74,35 @@
$str .= "\n\n";
foreach my $table (keys %tables)
{
+ my $numlines = 1;
+ my $lengthsofar = length($str);
+ my $continuator = '';
$str .= "$table.c : compile Makefile.PL";
foreach my $file (@{$tables{$table}})
{
- $str .= ' '.$self->catfile($dir,$file);
+ $str .= $continuator.' '.$self->catfile($dir,$file);
+ if ( length($str)-$lengthsofar > 128*$numlines )
+ {
+ $continuator .= " \\\n\t";
+ $numlines++;
+ } else {
+ $continuator = '';
+ }
}
+ $numlines = 1;
+ $lengthsofar = length($str);
+ $continuator = '';
$str .= "\n\t\$(PERL) compile \$\@";
foreach my $file (@{$tables{$table}})
{
- $str .= ' '.$self->catfile($dir,$file);
+ $str .= $continuator.' '.$self->catfile($dir,$file);
+ if ( length($str)-$lengthsofar > 128*$numlines )
+ {
+ $continuator .= "\n\t\$(PERL) compile \$\@";
+ $numlines++;
+ } else {
+ $continuator = '';
+ }
}
$str .= "\n\n";
}
[end of patch]