3 use ExtUtils::MakeMaker;
7 defcodes => ['ascii.ucm',
14 VERSION_FROM => 'Encode.pm',
15 OBJECT => '$(O_FILES)',
17 COMPRESS => 'gzip -9f',
19 DIST_DEFAULT => 'all tardist',
31 # Find existing O_FILES
32 foreach my $f (@{$self->{'O_FILES'}})
36 my $x = $self->{'OBJ_EXT'};
37 # Add the table O_FILES
38 foreach my $e (keys %tables)
42 # Trick case-blind filesystems.
43 delete $o{'encode'.$x};
46 $self->{'O_FILES'} = [sort keys %o];
48 foreach my $table (keys %tables)
50 foreach my $ext (qw($(OBJ_EXT) .c .h _def.h .fnm))
52 push (@files,$table.$ext);
55 $self->{'clean'}{'FILES'} .= join(' ',@files);
62 my $dir = $self->catdir($self->curdir,'Encode');
63 my $str = "# Encode\$(OBJ_EXT) depends on .h and _def.h files not .c files - but all written by compile\n";
64 $str .= 'Encode$(OBJ_EXT) :';
65 foreach my $table (keys %tables)
70 foreach my $table (keys %tables)
73 my $lengthsofar = length($str);
75 $str .= "$table.c : compile Makefile.PL";
76 foreach my $file (@{$tables{$table}})
78 $str .= $continuator.' '.$self->catfile($dir,$file);
79 if ( length($str)-$lengthsofar > 128*$numlines )
81 $continuator .= " \\\n\t";
87 $str .= $^O eq 'VMS' # In VMS quote to preserve case
88 ? qq{\n\t\$(PERL) compile -"Q" -"O" -o \$\@ -f $table.fnm\n\n}
89 : qq{\n\t\$(PERL) compile -Q -O -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";