3 use ExtUtils::MakeMaker;
5 my %tables = (EUC_JP => [
15 NAME => "Encode::EUC_JP",
16 VERSION_FROM => 'EUC_JP.pm',
17 OBJECT => '$(O_FILES)',
19 COMPRESS => 'gzip -9f',
21 DIST_DEFAULT => 'all tardist',
24 # OS 390 winges about line numbers > 64K ???
25 XSOPT => '-nolinenumbers',
35 my $x = $self->{'OBJ_EXT'};
36 # Add the table O_FILES
37 foreach my $e (keys %tables)
41 $self->{'O_FILES'} = [sort keys %o];
44 foreach my $table (keys %tables) {
45 $xs{"$table.xs"} = "$table.c";
46 foreach my $ext (qw($(OBJ_EXT) .xs .c .h _def.h .fnm)) {
47 push (@files,$table.$ext);
50 $self->{'XS_FILES'} = {%xs};
51 $self->{'clean'}{'FILES'} .= join(' ',@files);
58 my $dir = $self->catdir($self->updir,'Encode');
59 my $str = "# Encode\$(OBJ_EXT) depends on .h and _def.h files not .c files - but all written by compile\n";
60 $str .= 'Encode$(OBJ_EXT) :';
61 foreach my $table (keys %tables)
66 foreach my $table (keys %tables)
68 $str .= "$table.c : $table.xs\n";
71 my $compile = $self->catfile($self->updir,'compile');
72 foreach my $table (keys %tables)
75 my $lengthsofar = length($str);
77 $str .= "$table.xs : $compile Makefile.PL";
78 foreach my $file (@{$tables{$table}})
80 $str .= $continuator.' '.$self->catfile($dir,$file);
81 if ( length($str)-$lengthsofar > 128*$numlines )
83 $continuator .= " \\\n\t";
89 $str .= "\n\t\$(PERL) $compile -o \$\@ -f $table.fnm\n\n";
90 open (FILELIST, ">$table.fnm")
91 || die "Could not open $table.fnm: $!";
92 foreach my $file (@{$tables{$table}})
94 print FILELIST $self->catfile($dir,$file) . "\n";