1 use ExtUtils::MakeMaker;
3 my %tables = (iso8859 => ['ascii.enc', 'cp1250.enc'],
4 EBCDIC => ['cp1047.enc','cp37.enc','posix-bc.enc'],
5 Symbols => ['symbol.enc','dingbats.enc'],
9 while (defined(my $file = readdir(ENC)))
11 if ($file =~ /iso8859.*\.enc/)
13 push(@{$tables{iso8859}},$file);
21 VERSION_FROM => 'Encode.pm',
22 OBJECT => '$(O_FILES)',
24 COMPRESS => 'gzip -9f',
26 DIST_DEFAULT => 'all tardist',
38 # Find existing O_FILES
39 foreach my $f (@{$self->{'O_FILES'}})
43 my $x = $self->{'OBJ_EXT'};
44 # Add the table O_FILES
45 foreach my $e (keys %tables)
50 $self->{'O_FILES'} = [sort keys %o];
52 foreach my $table (keys %tables)
54 foreach my $ext (qw($(OBJ_EXT) .c .h .def))
56 push (@files,$table.$ext);
59 $self->{'clean'}{'FILES'} .= join(' ',@files);
66 my $dir = $self->catdir($self->curdir,'Encode');
67 my $str = "# Encode$(OBJ_EXT) depends on .h and .def files not .c files - but all written by compile\n";
68 $str .= 'Encode$(OBJ_EXT) :';
70 foreach my $table (keys %tables)
75 foreach my $table (keys %tables)
77 $str .= "$table.c : compile Makefile.PL";
78 foreach my $file (@{$tables{$table}})
80 $str .= ' '.$self->catfile($dir,$file);
82 $str .= "\n\t\$(PERL) compile \$\@";
83 foreach my $file (@{$tables{$table}})
85 $str .= ' '.$self->catfile($dir,$file);