From: Nick Ing-Simmons Date: Fri, 1 Feb 2002 16:27:59 +0000 (+0000) Subject: Minor Encode tweaks: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=023d8852d6bde0330d0722ae3a1239d17f22b192;p=p5sagit%2Fp5-mst-13.2.git Minor Encode tweaks: - move Encode.pm back to top of Encode like normal XS extension - avoid .def as a file extension (Win32 builds) p4raw-id: //depot/perlio@14515 --- diff --git a/MANIFEST b/MANIFEST index 7e5729f..a74b06c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -328,7 +328,7 @@ ext/Encode/Encode/symbol.enc Encode table ext/Encode/Encode/symbol.ucm Encode table ext/Encode/Encode/viscii.enc Encode table ext/Encode/Encode/viscii.ucm Encode table -ext/Encode/lib/Encode.pm Encode extension +ext/Encode/Encode.pm Encode extension ext/Encode/lib/Encode/Encoding.pm Encode extension ext/Encode/lib/Encode/Internal.pm Encode extension ext/Encode/lib/Encode/iso10646_1.pm Encode extension diff --git a/ext/Encode/EUC_JP/Makefile.PL b/ext/Encode/EUC_JP/Makefile.PL index 2b51469..6b65c9a 100644 --- a/ext/Encode/EUC_JP/Makefile.PL +++ b/ext/Encode/EUC_JP/Makefile.PL @@ -2,10 +2,13 @@ use 5.7.2; use strict; use ExtUtils::MakeMaker; -my %tables = (EUC_JP => ['euc-jp.ucm', - # 'euc-kr.ucm', 'euc-cn.ucm' - ], - ); +my %tables = (EUC_JP => [ + 'euc-jp.ucm', +# 'jis0201.enc', +# 'jis0212.enc', +# 'jis0208.enc', +# 'shiftjis.enc', + ]); WriteMakefile( @@ -39,7 +42,7 @@ sub post_initialize my %xs; foreach my $table (keys %tables) { $xs{"$table.xs"} = "$table.c"; - foreach my $ext (qw($(OBJ_EXT) .xs .c .h .def .fnm)) { + foreach my $ext (qw($(OBJ_EXT) .xs .c .h _def.h .fnm)) { push (@files,$table.$ext); } } @@ -52,7 +55,7 @@ sub postamble { my $self = shift; my $dir = $self->catdir($self->updir,'Encode'); - my $str = "# Encode\$(OBJ_EXT) depends on .h and .def files not .c files - but all written by compile\n"; + my $str = "# Encode\$(OBJ_EXT) depends on .h and _def.h files not .c files - but all written by compile\n"; $str .= 'Encode$(OBJ_EXT) :'; foreach my $table (keys %tables) { diff --git a/ext/Encode/lib/Encode.pm b/ext/Encode/Encode.pm similarity index 100% rename from ext/Encode/lib/Encode.pm rename to ext/Encode/Encode.pm diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs index 37d8aac..2d56616 100644 --- a/ext/Encode/Encode.xs +++ b/ext/Encode/Encode.xs @@ -662,7 +662,7 @@ BOOT: #if defined(USE_PERLIO) && !defined(USE_SFIO) PerlIO_define_layer(aTHX_ &PerlIO_encode); #endif -#include "8859.def" -#include "EBCDIC.def" -#include "Symbols.def" +#include "8859_def.h" +#include "EBCDIC_def.h" +#include "Symbols_def.h" } diff --git a/ext/Encode/Makefile.PL b/ext/Encode/Makefile.PL index 3a26ad8..5193d0e 100644 --- a/ext/Encode/Makefile.PL +++ b/ext/Encode/Makefile.PL @@ -20,7 +20,7 @@ closedir(ENC); WriteMakefile( NAME => "Encode", - VERSION_FROM => 'lib/Encode.pm', + VERSION_FROM => 'Encode.pm', OBJECT => '$(O_FILES)', 'dist' => { COMPRESS => 'gzip -9f', @@ -56,7 +56,7 @@ sub post_initialize my @files; foreach my $table (keys %tables) { - foreach my $ext (qw($(OBJ_EXT) .c .h .def .fnm)) + foreach my $ext (qw($(OBJ_EXT) .c .h _def.h .fnm)) { push (@files,$table.$ext); } @@ -69,7 +69,7 @@ sub postamble { my $self = shift; my $dir = $self->catdir($self->curdir,'Encode'); - my $str = "# Encode\$(OBJ_EXT) depends on .h and .def files not .c files - but all written by compile\n"; + my $str = "# Encode\$(OBJ_EXT) depends on .h and _def.h files not .c files - but all written by compile\n"; $str .= 'Encode$(OBJ_EXT) :'; foreach my $table (keys %tables) { diff --git a/ext/Encode/compile b/ext/Encode/compile index bb2683f..f52b4ed 100755 --- a/ext/Encode/compile +++ b/ext/Encode/compile @@ -53,7 +53,7 @@ open(C,">$cname") || die "Cannot open $cname:$!"; my $dname = $cname; -$dname =~ s/(\.[^\.]*)?$/.def/; +$dname =~ s/(\.[^\.]*)?$/_def.h/; my ($doC,$doEnc,$doUcm,$doPet); @@ -73,7 +73,7 @@ if ($cname =~ /\.(c|xs)$/) /* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! This file was autogenerated by: - $^X $0 $cname @orig_ARGV + $^X $0 @orig_ARGV */ END } @@ -190,7 +190,7 @@ if ($doC) my $mod = $1; print C <<'END'; -void +static void Encode_XSEncoding(pTHX_ encode_t *enc) { dSP;