Oops, forgot to see [EMAIL PROTECTED]

Dan

Begin forwarded message:

> From: Dan Kogai <[EMAIL PROTECTED]>
> Date: Fri Mar 29, 2002  05:39:42  Asia/Tokyo
> To: Nick Ing-Simmons <[EMAIL PROTECTED]>, Jarkko Hietaniemi 
> <[EMAIL PROTECTED]>, Autrijus Tang <[EMAIL PROTECTED]>, Jungshik Shin 
> <[EMAIL PROTECTED]>, SADAHIRO Tomoyuki <[EMAIL PROTECTED]>
> Subject: [Encode] compile -> bin/enc2xs

NI-S and Encode Hackers,

NI-S in (Prehistoric) Encode.pm
> The tables are produced by the Perl script F<compile> (the name needs
> to change so we can eventually install it somewhere). F<compile> can
> currently read two formats:

   I have worked this one out at last!  To do so, I have applied the 
changes below;

- encode.h
+ Encode/encode.h
   encode.h moved to Encode/ so it will be installed for the later
   use by enc2xs
! enc2xs
   h2xs-like feature added via "h2xs -M Name *.(enc|ucm)"
! Makefile.PL
! */Makefile.PL
- compile
+ bin/enc2xs
   compile renamed to enc2xs.
   Affected Makefle.PL updated

   After making sure renamed bin/enc2xs works,  I have added one more 
option to enc2xs, the -M option that generates the module suite out of 
*.ucm or *.enc.  Have a look at enc2xs in action.

> dankogai@dan-attic[2714]:~/work/test_enc2xs> 
> ls                                 total 5
>  5 my.ucm
> dankogai@dan-attic[2715]:~/work/test_enc2xs> perl5.7.3 
> ../Encode-current/bin/enc2xs -M My *.ucm
> dankogai@dan-attic[2716]:~/work/test_enc2xs> ls
> total 11
>  4 Makefile.PL   1 My.pm         5 my.ucm        1 t/
> dankogai@dan-attic[2717]:~/work/test_enc2xs> perl5.7.3 Makefile.PL
> Writing Makefile for Encode::My
> dankogai@dan-attic[2718]:~/work/test_enc2xs> make test
> cp My.pm blib/lib/Encode/My.pm
> /usr/home/dankogai/bin/perl5.7.3 /home/dankogai/work/Encode-
> current/bin/enc2xs -Q -O -o encode_t.c -f encode_t.fnm
> Reading myascii (myascii)
> Writing compiled form
> 128 bytes in string tables
> 384 bytes (25%) saved spotting duplicates
> 1 bytes (99.2%) saved using substrings
> /usr/home/dankogai/bin/perl5.7.3 
> /home/dankogai/lib/perl5/5.7.3/ExtUtils/xsubpp  -nolinenumbers -typemap 
> /home/dankogai/lib/perl5/5.7.3/ExtUtils/typemap  My.xs > My.xsc && mv 
> My.xsc My.c
> cc -c  -I/home/dankogai/lib/perl5/site_perl/5.7.3/i386-freebsd/Encode  
> -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing 
> -I/usr/local/include -O    -DVERSION=\"0.01\"  -DXS_VERSION=\"0.01\" 
> -DPIC -fpic -I/home/dankogai/lib/perl5/5.7.3/i386-freebsd/CORE   My.c
> cc -c  -I/home/dankogai/lib/perl5/site_perl/5.7.3/i386-freebsd/Encode  
> -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing 
> -I/usr/local/include -O    -DVERSION=\"0.01\"  -DXS_VERSION=\"0.01\" 
> -DPIC -fpic -I/home/dankogai/lib/perl5/5.7.3/i386-freebsd/CORE   
> encode_t.c
> Running Mkbootstrap for Encode::My ()
> chmod 644 My.bs
> rm -f blib/arch/auto/Encode/My/My.so
> LD_RUN_PATH="" cc  -shared  -L/usr/local/lib My.o  encode_t.o  -o 
> blib/arch/auto/Encode/My/My.so
> chmod 755 blib/arch/auto/Encode/My/My.so
> cp My.bs blib/arch/auto/Encode/My/My.bs
> chmod 644 blib/arch/auto/Encode/My/My.bs
> PERL_DL_NONLAZY=1 /usr/home/dankogai/bin/perl5.7.3 -Iblib/arch 
> -Iblib/lib -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; 
> runtests @ARGV;' t/*.t
> t/My....ok
> All tests successful.
> Files=1, Tests=2,  0 wallclock secs ( 0.09 cusr +  0.01 csys =  0.09 
> CPU)

   As you see, you can now add any (table-based) encoding so long as you 
can edit UCM!  I hope you guys like it.
   For the time being, things in bin/ directory will not be installed 
unless you explictly say

   breadperl Makefile.PL USE_SCRIPTS

   jhi, whether you put enc2xs to utils/ is up to you.

I will release 1.00 after I am done with pod for this.

Dan the Encode Maintainer

Reply via email to