use 5.7.2;
use strict;
use ExtUtils::MakeMaker;
+use strict;
my %tables = (
euc_jp_t => ['euc-jp.ucm'],
sjis_t => ['shiftjis.ucm',
'macJapanese.ucm',
'cp932.ucm'],
+ raw_t => [
+ qw(jis0201.ucm jis0208.ucm jis0212.ucm)
+ ],
);
+unless ($ENV{AGGREGATE_TABLES}){
+ my @ucm;
+ for my $k (keys %tables){
+ push @ucm, @{$tables{$k}};
+ }
+ %tables = ();
+ my $seq = 0;
+ for my $ucm (sort @ucm){
+ # 8.3 compliance !
+ my $t = sprintf ("%s_%02d_t", substr($ucm, 0, 2), $seq++);
+ $tables{$t} = [ $ucm ];
+ }
+}
+
my $name = 'JP';
WriteMakefile(
$self->{'O_FILES'} = [sort keys %o];
my @files = ("$name.xs");
$self->{'C'} = ["$name.c"];
+ $self->{SOURCE} .= " $name.c"
+ if $^O eq 'MacOS' && $self->{SOURCE} !~ /\b$name\.c\b/;
$self->{'H'} = [$self->catfile($self->updir,'Encode', 'encode.h')];
my %xs;
foreach my $table (keys %tables) {
foreach my $ext (qw($(OBJ_EXT) .c .h .exh .fnm)) {
push (@files,$table.$ext);
}
+ $self->{SOURCE} .= " $table.c"
+ if $^O eq 'MacOS' && $self->{SOURCE} !~ /\b$table\.c\b/;
}
$self->{'XS'} = { "$name.xs" => "$name.c" };
$self->{'clean'}{'FILES'} .= join(' ',@files);
$continuator = '';
}
}
- my $plib = $ENV{PERL_CORE} ? '-I$(PERL_LIB)' : '';
- my $ucopts = ($^O eq 'VMS') ? '-"Q"' : '-Q'; # VMS tweaks
+ my $plib = $self->{PERL_CORE} ? '"-I$(PERL_LIB)"' : '';
+ $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
+ my $ucopts = '-"Q"';
$str .=
qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
open (FILELIST, ">$table.fnm")