Integrate mainline
[p5sagit/p5-mst-13.2.git] / ext / Encode / CN / Makefile.PL
index d0630b8..46b262d 100644 (file)
@@ -3,8 +3,10 @@ use strict;
 use ExtUtils::MakeMaker;
 
 my %tables = (euc_cn_t   => ['euc-cn.ucm',
-                            'cp936.ucm',],
-             '2312_t'   => ['gb2312.ucm'],
+                            'cp936.ucm',
+                            'macChinsimp.ucm',
+                            ],
+             '2312_t'    => ['gb2312.ucm'],
              '12345_t'  => ['gb12345.ucm'],
              ir_165_t   => ['ir-165.ucm'],
              );
@@ -49,7 +51,7 @@ sub post_initialize
        push (@{$self->{'C'}},"$table.c");
        # Do NOT add $table.h etc. to H_FILES unless we own up as to how they
        # get built.
-       foreach my $ext (qw($(OBJ_EXT) .c .h _def.h .fnm)) {
+       foreach my $ext (qw($(OBJ_EXT) .c .h .exh .fnm)) {
            push (@files,$table.$ext);
        }
     }
@@ -93,7 +95,7 @@ BOOT:
 {
 END
     foreach my $table (keys %tables) {
-       print XS qq[#include "${table}_def.h"\n];
+       print XS qq[#include "${table}.exh"\n];
     }
     print XS "}\n";
     close(XS);
@@ -104,7 +106,7 @@ sub postamble
 {
     my $self = shift;
     my $dir  = $self->catdir($self->updir,'ucm');
-    my $str  = "# $name\$(OBJ_EXT) depends on .h and _def.h files not .c files - but all written by enc2xs\n";
+    my $str  = "# $name\$(OBJ_EXT) depends on .h and .exh files not .c files - but all written by enc2xs\n";
     $str    .= "$name.c : $name.xs ";
     foreach my $table (keys %tables)
     {
@@ -131,9 +133,10 @@ sub postamble
                $continuator = '';
            }
        }
-        $str .= $^O eq 'VMS' # In VMS quote to preserve case
-            ? qq{\n\t\$(PERL) $enc2xs -"Q" -o \$\@ -f $table.fnm\n\n}
-            : qq{\n\t\$(PERL) $enc2xs -Q -o \$\@ -f $table.fnm\n\n};
+       my $plib   = $self->{PERL_CORE} ? '"-I$(PERL_LIB)"' : '';
+       my $ucopts = '-"Q"';
+       $str .=  
+           qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
        open (FILELIST, ">$table.fnm")
            || die "Could not open $table.fnm: $!";
        foreach my $file (@{$tables{$table}})