Upgrade to Encode 1.26, from Dan Kogai.
[p5sagit/p5-mst-13.2.git] / ext / Encode / Encode / Makefile_PL.e2x
index 000ce92..59b5149 100644 (file)
@@ -53,7 +53,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);
        }
     }
@@ -97,7 +97,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);
@@ -108,7 +108,7 @@ sub postamble
 {
     my $self = shift;
     my $dir  = "."; # $self->catdir('Encode');
-    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)
     {
@@ -134,9 +134,10 @@ sub postamble
                $continuator = '';
            }
        }
-        $str .= $^O eq 'VMS' # In VMS quote to preserve case
-            ? qq{\n\t\$(PERL) $enc2xs -"Q" -"O" -o \$\@ -f $table.fnm\n\n}
-            : qq{\n\t\$(PERL) $enc2xs -Q -O -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}})