3 use ExtUtils::MakeMaker;
5 my %tables = (EUC_JP => [
16 NAME => "Encode::EUC_JP",
17 VERSION_FROM => 'EUC_JP.pm',
18 OBJECT => '$(O_FILES)',
20 COMPRESS => 'gzip -9f',
22 DIST_DEFAULT => 'all tardist',
34 my $x = $self->{'OBJ_EXT'};
35 # Add the table O_FILES
36 foreach my $e (keys %tables)
40 $self->{'O_FILES'} = [sort keys %o];
43 foreach my $table (keys %tables) {
44 $xs{"$table.xs"} = "$table.c";
45 foreach my $ext (qw($(OBJ_EXT) .xs .c .h _def.h .fnm)) {
46 push (@files,$table.$ext);
49 $self->{'XS_FILES'} = {%xs};
50 $self->{'clean'}{'FILES'} .= join(' ',@files);
57 my $dir = $self->catdir($self->updir,'Encode');
58 my $str = "# Encode\$(OBJ_EXT) depends on .h and _def.h files not .c files - but all written by compile\n";
59 $str .= 'Encode$(OBJ_EXT) :';
60 foreach my $table (keys %tables)
65 my $compile = $self->catfile($self->updir,'compile');
66 foreach my $table (keys %tables)
69 my $lengthsofar = length($str);
71 $str .= "$table.xs : $compile Makefile.PL";
72 foreach my $file (@{$tables{$table}})
74 $str .= $continuator.' '.$self->catfile($dir,$file);
75 if ( length($str)-$lengthsofar > 128*$numlines )
77 $continuator .= " \\\n\t";
83 $str .= "\n\t\$(PERL) $compile -o \$\@ -f $table.fnm\n\n";
84 open (FILELIST, ">$table.fnm")
85 || die "Could not open $table.fnm: $!";
86 foreach my $file (@{$tables{$table}})
88 print FILELIST $self->catfile($dir,$file) . "\n";