Change 30286 by [EMAIL PROTECTED] on 2007/02/14 14:15:49

        Integrate:
        [ 28062]
        Move some scripts under win32/ce-helpers.
        
        Subject: RE: Merge WinCE into Win32 directory and remove the the WinCE 
dir ectory
        From: "Konovalov, Vadim Vladimirovich (Vadim)** CTR **" <[EMAIL 
PROTECTED]>
        Date: Tue, 2 May 2006 17:30:59 +0200 
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28072]
        Subject: Re: Smoke [5.9.4] 28069 FAIL(M) MSWin32 WinXP/.Net SP2 (x86/2 
cpu)
        From: Vadim <[EMAIL PROTECTED]>
        Date: Wed, 03 May 2006 06:10:59 +0400
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28085]
        Subject: [PATCH] wince another step
        From: "Konovalov, Vadim Vladimirovich (Vadim)** CTR **"
        Date: Wed, 3 May 2006 20:11:11 +0200 
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28096]
        Subject: [PATCH-for-28089] wince yet another step
        From: "Konovalov, Vadim Vladimirovich (Vadim)** CTR **" <[EMAIL 
PROTECTED]>
        Date: Thu, 4 May 2006 13:04:45 +0200 
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28100]
        Subject: RE: [PATCH-for-28089] wince yet another step
        From: "Konovalov, Vadim Vladimirovich (Vadim)** CTR **" <[EMAIL 
PROTECTED]>
        Date: Thu, 4 May 2006 17:32:12 +0200 
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28140]
        Subject: wince crosscompile patch for 28132
        From: Vadim <[EMAIL PROTECTED]>
        Date: Tue, 09 May 2006 15:09:43 +0400
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 29145]
        Subject: [EMAIL PROTECTED] wince patch
        From: Vadim <[EMAIL PROTECTED]>
        Date: Sat, 28 Oct 2006 23:48:46 +0400
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 29213]
        The non-unix parts for localtime_r_needs_tzset
        Plus forced Glossary entry. That is a TODO for automation
        
        [ 29424]
        I think #29060 / #29073 missed this
        
        [ 29451]
        Change #29424 may well be correct in itself, but currently doesn't
        work when perl is built with PERL_IMPLICIT_SYS because PERLIO_TERM
        uses PerlMemShared_free() which, in that case, involves the perlhost
        that has already been freed itself by perl_free(), which is called
        before PERL_SYS_TERM().
        
        The order of perl_destruct(), perl_free(), PERL_SYS_TERM() cannot
        be changed (it is advertised in perlembed for a start), so just
        revert #29424 and the appropriate parts of #29442 for now.
        
        Perhaps PL_perlio_fd_refcnt needs allocating differently, or else
        the perlhost needs freeing later (after PerlIO)?
        
        [ 29465]
        Subject: [PATCH] Re: When should PERL_SYS_TERM() be called? [was: Re: 
[PATCH] Re: [PATCH] Re: [PATCH] abstract mempool header testing]
        From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
        Date: Mon, 04 Dec 2006 22:53:03 -0500
        Message-ID: <[EMAIL PROTECTED]>
        
        Re-instates #29424 (previously reverted by #29451), now fixed to work
        with PERL_IMPLICIT_SYS, thanks to Jan Dubois. Also adds PERLIO_TERM to
        the Symbian port.
        
        [ 29604]
        Subject: Re: [PATCH] Making adding binary files possible
        From: demerphq <[EMAIL PROTECTED]>
        Date: Wed, 20 Dec 2006 16:00:33 +0100
        Message-ID: <[EMAIL PROTECTED]>
        
        plus matching updates to Makefile.SH and patching.pod

Affected files ...

... //depot/maint-5.8/perl/INSTALL#41 integrate
... //depot/maint-5.8/perl/MANIFEST#328 integrate
... //depot/maint-5.8/perl/README.ce#7 integrate
... //depot/maint-5.8/perl/perl.h#158 integrate
... //depot/maint-5.8/perl/perlio.c#106 integrate
... //depot/maint-5.8/perl/win32/Makefile.ce#5 integrate
... //depot/maint-5.8/perl/win32/ce-helpers/cecopy-lib.pl#1 branch
... //depot/maint-5.8/perl/win32/ce-helpers/comp.pl#1 branch
... //depot/maint-5.8/perl/win32/ce-helpers/compile-all.bat#1 branch
... //depot/maint-5.8/perl/win32/ce-helpers/compile.bat#1 branch
... //depot/maint-5.8/perl/win32/ce-helpers/makedist.pl#1 branch
... //depot/maint-5.8/perl/win32/ce-helpers/registry.bat#1 branch
... //depot/maint-5.8/perl/win32/cecopy-lib.pl#2 delete
... //depot/maint-5.8/perl/win32/comp.pl#2 delete
... //depot/maint-5.8/perl/win32/compile-all.bat#2 delete
... //depot/maint-5.8/perl/win32/compile.bat#2 delete
... //depot/maint-5.8/perl/win32/config.ce#3 integrate
... //depot/maint-5.8/perl/win32/config_H.ce#2 integrate
... //depot/maint-5.8/perl/win32/makedist.pl#2 delete
... //depot/maint-5.8/perl/win32/perllib.c#6 integrate
... //depot/maint-5.8/perl/win32/perlmain.c#2 delete
... //depot/maint-5.8/perl/win32/perlmaince.c#1 branch
... //depot/maint-5.8/perl/win32/registry.bat#2 delete
... //depot/maint-5.8/perl/win32/vmem.h#4 integrate
... //depot/maint-5.8/perl/win32/win32-d.h#2 delete
... //depot/maint-5.8/perl/win32/win32.h#13 integrate
... //depot/maint-5.8/perl/win32/wince.c#3 integrate
... //depot/maint-5.8/perl/win32/xconfig.h#2 delete

Differences ...

==== //depot/maint-5.8/perl/INSTALL#41 (text) ====
Index: perl/INSTALL
--- perl/INSTALL#40~30132~      2007-02-05 09:37:09.000000000 -0800
+++ perl/INSTALL        2007-02-14 06:15:49.000000000 -0800
@@ -1953,7 +1953,8 @@
    sh ./Configure -des -Dusecrosscompile -D...
 
 This will make the cpp symbol USE_CROSS_COMPILE and the %Config
-symbol C<usecrosscompile> available.
+symbol C<usecrosscompile> available, and C<xconfig.h> will be used
+for cross-compilation.
 
 During the Configure and build, certain helper scripts will be created
 into the Cross/ subdirectory.  The scripts are used to execute a

==== //depot/maint-5.8/perl/MANIFEST#328 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#327~30282~    2007-02-14 05:38:24.000000000 -0800
+++ perl/MANIFEST       2007-02-14 06:15:49.000000000 -0800
@@ -3100,10 +3100,12 @@
 win32/bin/runperl.pl           run perl script via batch file namesake
 win32/bin/search.pl            Win32 port
 win32/buildext.pl              Build extensions once miniperl is built
-win32/cecopy-lib.pl            WinCE port
-win32/comp.pl                  WinCE port
-win32/compile-all.bat          WinCE port
-win32/compile.bat              WinCE port
+win32/ce-helpers/cecopy-lib.pl WinCE port
+win32/ce-helpers/comp.pl       WinCE port
+win32/ce-helpers/compile-all.bat       WinCE port
+win32/ce-helpers/compile.bat   WinCE port
+win32/ce-helpers/makedist.pl   WinCE port
+win32/ce-helpers/registry.bat  WinCE port
 win32/config.bc                        Win32 base line config.sh (Borland C++ 
build)
 win32/config.ce                        WinCE port
 win32/config.gc                        Win32 base line config.sh (mingw32/gcc 
build)
@@ -3140,7 +3142,6 @@
 win32/include/dirent.h         Win32 port
 win32/include/netdb.h          Win32 port
 win32/include/sys/socket.h     Win32 port
-win32/makedist.pl              WinCE port
 win32/makefile.mk              Win32 makefile for DMAKE (BC++, VC++ builds)
 win32/mdelete.bat              multifile delete
 win32/perl.rc                  WinCE port
@@ -3149,9 +3150,8 @@
 win32/perlglob.c               Win32 port
 win32/perlhost.h               Perl "host" implementation
 win32/perllib.c                        Win32 port
-win32/perlmain.c               WinCE port
+win32/perlmaince.c             WinCE port
 win32/pod.mak                  Win32 port
-win32/registry.bat             WinCE port
 win32/runperl.c                        Win32 port
 win32/splittree.pl             Win32 port
 win32/sync_ext.pl              Win32 port
@@ -3159,7 +3159,6 @@
 win32/vmem.h                   Perl "host" memory manager for CE
 win32/win32.c                  Win32 port
 win32/win32.h                  Win32 port
-win32/win32-d.h                        WinCE port
 win32/win32ceio.c              Win32/WinCE PerlIO layer support
 win32/win32io.c                        Win32 PerlIO layer support
 win32/win32iop.h               Win32 port
@@ -3170,7 +3169,6 @@
 win32/wince.c                  WinCE port
 win32/wince.h                  WinCE port
 win32/wincesck.c               WinCE port
-win32/xconfig.h                        WinCE port
 writemain.SH                   Generate perlmain.c from 
miniperlmain.c+extensions
 x2p/a2p.c                      Output of a2p.y run through byacc
 x2p/a2p.h                      Global declarations

==== //depot/maint-5.8/perl/README.ce#7 (text) ====
Index: perl/README.ce
--- perl/README.ce#6~30132~     2007-02-05 09:37:09.000000000 -0800
+++ perl/README.ce      2007-02-14 06:15:49.000000000 -0800
@@ -24,34 +24,34 @@
 to run on Win32, and it will facilitate remaining build process; all binaries
 built after it are foreign and should not run locally.
 
-C<miniperl> is built using ../win32/Makefile; this is part of normal
+C<miniperl> is built using C<./win32/Makefile>; this is part of normal
 build process invoked as dependency from wince/Makefile.ce
 
 =item *
 
-After C<miniperl> is built, 'configpm' is invoked to create right Config.pm
+After C<miniperl> is built, C<configpm> is invoked to create right C<Config.pm>
 in right place and its corresponding Cross.pm.
 
-Unlike Win32 build, miniperl will not have Config.pm of host within reach;
-it rather will use Config.pm from within cross-compilation directories.
+Unlike Win32 build, miniperl will not have C<Config.pm> of host within reach;
+it rather will use C<Config.pm> from within cross-compilation directories.
 
-File Cross.pm is dead simple: for given cross-architecture places in @INC
-a path where perl modules are, and right Config.pm in that place.
+File C<Cross.pm> is dead simple: for given cross-architecture places in @INC
+a path where perl modules are, and right C<Config.pm> in that place.
 
 That said, C<miniperl -Ilib -MConfig -we 1> should report an error, because
-it can not find Config.pm. If it does not gives an error -- wrong Config.pm
+it can not find C<Config.pm>. If it does not gives an error -- wrong 
C<Config.pm>
 is substituted, and resulting binaries will be a mess.
 
 C<miniperl -MCross -MConfig -we 1> should run okay, and it will provide right
-Config.pm for further compilations.
+C<Config.pm> for further compilations.
 
 =item *
 
 During extensions build phase, a script C<./win32/buldext.pl> is invoked,
-which in turn steps in ./ext subdirectories and performs a build of
+which in turn steps in C<./ext> subdirectories and performs a build of
 each extension in turn.
 
-All invokes of Makefile.PL are provided with C<-MCross> so to enable cross-
+All invokes of C<Makefile.PL> are provided with C<-MCross> so to enable cross-
 compile.
 
 =item *
@@ -85,21 +85,21 @@
 
 =head3 Make
 
-Normally you only need to edit ./wince/compile.bat
+Normally you only need to edit C<./win32/ce-helpers/compile.bat>
 to reflect your system and run it.
 
-File ./wince/compile.bat is actually a wrapper to call
-nmake -f makefile.ce with appropriate parameters and it accepts extra
-parameters and forwards them to "nmake" command as additional
+File C<./win32/ce-helpers/compile.bat> is actually a wrapper to call
+C<nmake -f makefile.ce> with appropriate parameters and it accepts extra
+parameters and forwards them to C<nmake> command as additional
 arguments. You should pass target this way.
 
 To prepare distribution you need to do following:
 
 =over 4
 
-=item * go to ./wince subdirectory
+=item * go to C<./win32> subdirectory
 
-=item * edit file compile.bat
+=item * edit file C<./win32/ce-helpers/compile.bat>
 
 =item * run 
   compile.bat
@@ -109,7 +109,7 @@
 
 =back
 
-makefile.ce has CROSS_NAME macro, and it is used further to refer to
+C<Makefile.ce> has C<CROSS_NAME> macro, and it is used further to refer to
 your cross-compilation scheme. You could assign a name to it, but this
 is not necessary, because by default it is assigned after your machine
 configuration name, such as "wince-sh3-hpc-wce211", and this is enough
@@ -117,8 +117,8 @@
 handy for several different builds on same platform to perform, say,
 threaded build. In a following example we assume that all required
 environment variables are set properly for C cross-compiler (a special
-*.bat file could fit perfectly to this purpose) and your compile.bat
-has proper "MACHINE" parameter set, to, say, "wince-mips-pocket-wce300".
+*.bat file could fit perfectly to this purpose) and your C<compile.bat>
+has proper "MACHINE" parameter set, to, say, C<wince-mips-pocket-wce300>.
 
   compile.bat
   compile.bat dist
@@ -126,16 +126,16 @@
   compile.bat CROSS_NAME=mips-wce300-thr "USE_ITHREADS=define" 
"USE_IMP_SYS=define" "USE_MULTI=define" dist
 
 If all goes okay and no errors during a build, you'll get two independent
-distributions: "wince-mips-pocket-wce300" and "mips-wce300-thr".
+distributions: C<wince-mips-pocket-wce300> and C<mips-wce300-thr>.
 
-Target 'dist' prepares distribution file set. Target 'zipdist' performs
-same as 'dist' but additionally compresses distribution files into zip
+Target C<dist> prepares distribution file set. Target C<zipdist> performs
+same as C<dist> but additionally compresses distribution files into zip
 archive.
 
-NOTE: during a build there could be created a number (or one) of Config.pm
-for cross-compilation ("foreign" Config.pm) and those are hidden inside
-../xlib/$(CROSS_NAME) with other auxilary files, but, and this is important to
-note, there should be *no* Config.pm for host miniperl.
+NOTE: during a build there could be created a number (or one) of C<Config.pm>
+for cross-compilation ("foreign" C<Config.pm>) and those are hidden inside
+C<../xlib/$(CROSS_NAME)> with other auxilary files, but, and this is important 
to
+note, there should be B<no> C<Config.pm> for host miniperl.
 If you'll get an error that perl could not find Config.pm somewhere in building
 process this means something went wrong. Most probably you forgot to
 specify a cross-compilation when invoking miniperl.exe to Makefile.PL
@@ -151,7 +151,7 @@
 to refer a cross-compilation that was created last time.
 
 All questions related to building for WinCE devices could be asked in
[EMAIL PROTECTED] mailing list.
+L<[EMAIL PROTECTED]> mailing list.
 
 =head1 Using Perl on WinCE
 
@@ -160,16 +160,18 @@
 PerlCE is currently linked with a simple console window, so it also
 works on non-hpc devices.
 
-The simple stdio implementation creates the files stdin.txt,
-stdout.txt and stderr.txt, so you might examine them if your
+The simple stdio implementation creates the files C<stdin.txt>,
+C<stdout.txt> and C<stderr.txt>, so you might examine them if your
 console has only a liminted number of cols.
 
 When exitcode is non-zero, a message box appears, otherwise the
 console closes, so you might have to catch an exit with
 status 0 in your program to see any output.
 
-stdout/stderr now go into the files /perl-stdout.txt and
-/perl-stderr.txt.
+stdout/stderr now go into the files C</perl-stdout.txt> and
+C</perl-stderr.txt.>
+
+PerlIDE is handy to deal with perlce.
 
 =head2 LIMITATIONS
 
@@ -180,14 +182,37 @@
 All environment vars must be stored in HKLM\Environment as
 strings. They are read at process startup.
 
-       PERL5LIB        - Usual perl lib path (semi-list).
-       PATH            - Semi-list for executables.
-       TMP             - Tempdir.
-       UNIXROOTPATH    - Root for accessing some special files,
-                         i.e. /dev/null, /etc/services.
-       ROWS/COLS       - Rows/cols for console.
-       HOME            - Home directory.
-       CONSOLEFONTSIZE - Size for console font.
+=over
+
+=item PERL5LIB
+
+Usual perl lib path (semi-list).
+
+=item PATH
+
+Semi-list for executables.
+
+=item TMP
+
+- Tempdir.
+
+=item UNIXROOTPATH
+
+- Root for accessing some special files, i.e. C</dev/null>, C</etc/services>.
+
+=item ROWS/COLS
+
+- Rows/cols for console.
+
+=item HOME
+
+- Home directory.
+
+=item CONSOLEFONTSIZE
+
+- Size for console font.
+
+=back
 
 You can set these with cereg.exe, a (remote) registry editor
 or via the PerlIDE.
@@ -195,51 +220,12 @@
 =head2 REGISTRY
 
 To start perl by clicking on a perl source file, you have
-to make the according entries in HKCR (see wince-reg.bat).
+to make the according entries in HKCR (see C<ce-helpers/wince-reg.bat>).
 cereg.exe (which must be executed on a desktop pc with
 ActiveSync) is reported not to work on some devices.
 You have to create the registry entries by hand using a 
 registry editor.
 
-=head2 PERLFILES
-
-The following files are a reasonable minimum if you want to do
-some socket stuff:
-
-       ./auto
-       ./auto/DynaLoader
-       ./auto/DynaLoader/autosplit.ix
-       ./auto/DynaLoader/dl_expandspec.al
-       ./auto/DynaLoader/dl_findfile.al
-       ./auto/DynaLoader/dl_find_symbol_anywhere.al
-       ./auto/IO
-       ./auto/IO/IO.bs
-       ./auto/IO/IO.dll
-       ./auto/Socket
-       ./auto/Socket/Socket.bs
-       ./auto/Socket/Socket.dll
-       ./Carp
-       ./Carp/Heavy.pm
-       ./Carp.pm
-       ./Config.pm
-       ./DynaLoader.pm
-       ./Exporter
-       ./Exporter/Heavy.pm
-       ./Exporter.pm
-       ./IO
-       ./IO/File.pm
-       ./IO/Handle.pm
-       ./IO/Socket.pm
-       ./IO.pm
-       ./SelectSaver.pm
-       ./Socket.pm
-       ./strict.pm
-       ./Symbol.pm
-       ./warnings
-       ./warnings/register.pm
-       ./warnings.pm
-       ./XSLoader.pm
-
 =head2 XS
 
 The following Win32-Methods are built-in:
@@ -280,6 +266,32 @@
 
 The port for Win32 was used as a reference.
 
+=head1 History of WinCE port
+
+=over
+
+=item 5.6.0
+
+Initial port of perl to WinCE. It was performed in separate directory
+named C<wince>. This port was based on contents of C<./win32> directory.
+C<miniperl> was not built, user must have HOST perl and properly edit 
+C<makefile.ce> to reflect this.
+
+=item 5.8.0
+
+wince port was kept in the same C<./wince> directory, and C<wince/Makefile.ce>
+was used to invoke native compiler to create HOST miniperl, which then
+facilitates cross-compiling process.
+Extension building support was added.
+
+=item 5.9.4
+
+Two directories C<./win32> and C<./wince> were merged, so perlce build
+process comes in C<./win32> directory.
+
+=over
+
+
 =head1 AUTHORS
 
 =over

==== //depot/maint-5.8/perl/perl.h#158 (text) ====
Index: perl/perl.h
--- perl/perl.h#157~30269~      2007-02-13 13:18:26.000000000 -0800
+++ perl/perl.h 2007-02-14 06:15:49.000000000 -0800
@@ -34,7 +34,11 @@
 #ifdef PERL_MICRO
 #   include "uconfig.h"
 #else
-#   include "config.h"
+#   ifndef USE_CROSS_COMPILE
+#       include "config.h"
+#   else
+#       include "xconfig.h"
+#   endif
 #endif
 
 #if defined(USE_ITHREADS) && defined(USE_5005THREADS)

==== //depot/maint-5.8/perl/perlio.c#106 (text) ====
Index: perl/perlio.c
--- perl/perlio.c#105~30279~    2007-02-14 03:47:20.000000000 -0800
+++ perl/perlio.c       2007-02-14 06:15:49.000000000 -0800
@@ -33,7 +33,11 @@
 #ifdef PERL_MICRO
 #   include "uconfig.h"
 #else
-#   include "config.h"
+#   ifndef USE_CROSS_COMPILE
+#       include "config.h"
+#   else
+#       include "xconfig.h"
+#   endif
 #endif
 
 #define PERLIO_NOT_STDIO 0

==== //depot/maint-5.8/perl/win32/Makefile.ce#5 (text) ====
Index: perl/win32/Makefile.ce
--- perl/win32/Makefile.ce#4~30284~     2007-02-14 05:46:26.000000000 -0800
+++ perl/win32/Makefile.ce      2007-02-14 06:15:49.000000000 -0800
@@ -1,6 +1,8 @@
+#
 # perl makefile for wince
+# During the cross-compilation, it first uses Makefile file to build
+# miniperl on HOST and then build required platform
 #
-# Time-stamp: <26/10/01 15:10:06 [EMAIL PROTECTED]>
 
 SRCDIR     = ..
 PV         = 58
@@ -380,7 +382,7 @@
 # Additional compiler flags can be specified here.
 #
 
-BUILDOPT       = $(BUILDOPT) $(CECFLAGS)
+BUILDOPT       = $(BUILDOPT) $(CECFLAGS) -DUSE_CROSS_COMPILE
 
 
 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
@@ -663,30 +665,6 @@
                .\include\sys\socket.h  \
                .\win32.h
 
-CORE_H         = $(CORE_NOCFG_H) .\config.h
-
-MICROCORE_OBJ  = $(MICROCORE_SRC:.c=.obj)
-CORE_OBJ       = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
-WIN32_OBJ      = $(WIN32_SRC:.c=.obj)
-#WIN32_OBJ     = $(WIN32_OBJ:.\=.\$(DLLDIR)\)
-MINICORE_OBJ   = $(MICROCORE_OBJ:..\=.\$(DLLDIR)\)     \
-                 $(MINIDIR)\miniperlmain$(o)   \
-                 $(MINIDIR)\perlio$(o)
-MINIWIN32_OBJ  = $(WIN32_OBJ:.\=.\$(DLLDIR)\)
-MINI_OBJ       = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
-DLL_OBJ                = $(DLL_SRC:.c=.obj)
-X2P_OBJ                = $(X2P_SRC:.c=.obj)
-
-PERLDLL_OBJ    = $(CORE_OBJ)
-PERLEXE_OBJ    = perlmain$(o)
-
-PERLDLL_OBJ    = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
-#PERLEXE_OBJ   = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
-
-!IF "$(USE_SETARGV)" != ""
-SETARGV_OBJ    = setargv$(o)
-!ENDIF
-
 DYNAMIC_EXT    = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
                Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
                Sys/Hostname
@@ -741,18 +719,18 @@
 
 all: hostminiperl $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) Extensions
 
-$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
+$(DYNALOADER)$(o) : $(DYNALOADER).c xconfig.h $(EXTDIR)\DynaLoader\dlutils.c
 
-$(CONFIGPM): .\xconfig.h ..\config.sh ..\minimod.pl
+$(CONFIGPM) : $(HPERL) ..\config.sh config_h.PL ..\minimod.pl
        cd .. && $(HPERL) configpm --cross=$(CROSS_NAME) --no-glossary
        -mkdir $(XCOREDIR)
        $(XCOPY) ..\*.h $(XCOREDIR)\*.*
        $(XCOPY) ..\*.inc $(XCOREDIR)\*.*
        $(XCOPY) *.h $(XCOREDIR)\*.*
-       $(XCOPY) xconfig.h $(XCOREDIR)\config.h
        $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
        $(RCOPY) include $(XCOREDIR)\*.*
-       $(HPERL) -I..\lib -MCross=$(CROSS_NAME) config_h.PL 
"INST_VER=$(INST_VER)" "CORE_DIR=$(XCOREDIR)" "CONFIG_H=xconfig.h"
+       -$(HPERL) -I..\lib -MCross=$(CROSS_NAME) config_h.PL 
"INST_VER=$(INST_VER)" "CORE_DIR=$(XCOREDIR)" "CONFIG_H=xconfig.h"
+       $(XCOPY) xconfig.h $(XCOREDIR)\config.h
 
 .\xconfig.h:
        -del /f xconfig.h
@@ -764,24 +742,27 @@
 $(MINIMOD) : ..\minimod.pl
        cd .. && $(HPERL) minimod.pl > lib\ExtUtils\Miniperl.pm
 
-perlmain.c : runperl.c
-       $(COPY) runperl.c perlmain.c
-
 $(DYNALOADER).c: $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
        if not exist $(AUTODIR) mkdir $(AUTODIR)
        cd $(EXTDIR)\$(*B)
        $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) $(*B)_pm.PL
        $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) XSLoader_pm.PL
-       cd ..\..\win
+       cd ..\..\win32
        $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
        $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
        cd $(EXTDIR)\$(*B)
        $(XSUBPP) dl_win32.xs > $(*B).c
-       cd ..\..\win
+       cd ..\..\win32
 
 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
        $(COPY) dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
 
+MakePPPort: $(MINIPERL) $(CONFIGPM)
+       $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ..\mkppport
+
+MakePPPort_clean:
+       -if exist $(HPERL) $(HPERL) -I..\lib ..\mkppport --clean
+
 
#----------------------------------------------------------------------------------
 NOT_COMPILE_EXT =
 !if "$(MACHINE)" == "wince-sh3-palm-wce211"
@@ -810,7 +791,7 @@
        -rm -f $(MACHINE)/*.dll
        -rm -f $(MACHINE)/*.lib
        -rm -f ../config.sh ../lib/Config.pm
-       -rm -f config.h perl.res
+       -rm -f config.h xconfig.h perl.res
 
 XDLLOBJS = \
 $(DLLDIR)\av.obj \
@@ -870,7 +851,7 @@
 $(DLLDIR)\toke.obj:
     $(CC) -c $(CFLAGS_O) -QMOb9000 -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ ..\toke.c
 
-{$(SRCDIR)/win}.c{$(DLLDIR)}.obj:
+{$(SRCDIR)/win32}.c{$(DLLDIR)}.obj:
     $(CC) -c $(CFLAGS_O) -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ $<
 
 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
@@ -900,7 +881,7 @@
           $(EXTDIR)\DynaLoader\DynaLoader.c
 
 XPERLEXEOBJS = \
-$(MACHINE)\perlmain.obj
+$(MACHINE)\perlmaince.obj
 
 $(PERLEXE) : $(PERLDLL) $(CONFIGPM) $(XPERLEXEOBJS) $(PERLEXE_RES) $(STARTOBJS)
        $(XCOPY) $(MACHINE)\*.lib $(XCOREDIR)
@@ -910,8 +891,8 @@
             -stack:0x100000 $(LINK_FLAGS) $(STARTOBJS) $(XPERLEXEOBJS) \
             $(PERLIMPLIB) $(PERLEXE_RES) $(LIBFILES)
 
-$(MACHINE)\perlmain.obj : perlmain.c
-       $(CC) $(CFLAGS_O) -UPERLDLL -Fo$(MACHINE)\ -c perlmain.c
+$(MACHINE)\perlmaince.obj : perlmaince.c
+       $(CC) $(CFLAGS_O) -UPERLDLL -Fo$(MACHINE)\ -c perlmaince.c
 
 iodll:     $(IO_DLL)
 socketdll: $(SOCKET_DLL)
@@ -953,17 +934,17 @@
        $(HPERL) -I.. mktables
 
 dist: all
-       $(HPERL) -I..\lib -MCross=$(CROSS_NAME) makedist.pl 
--distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
+       $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl 
--distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
 
 zipdist: all
-       $(HPERL) -I..\lib -MCross=$(CROSS_NAME) makedist.pl 
--distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
-       $(HPERL) -I..\lib -MCross=$(CROSS_NAME) makedist.pl 
--distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
+       $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl 
--distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
+       $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl 
--distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
 
 zip:
-       $(HPERL) -I..\lib -MCross=$(CROSS_NAME) makedist.pl 
--distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
+       $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl 
--distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
 
 perl.ico:
-       $(HPERL) makeico.pl perl.ico
+       $(HPERL) -I..\lib ..\uupacktool.pl -u perlexe.ico.packd perl.ico
 
 hostminiperl: ..\miniperl.exe
 

==== //depot/maint-5.8/perl/win32/ce-helpers/cecopy-lib.pl#1 (text) ====
Index: perl/win32/ce-helpers/cecopy-lib.pl
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/win32/ce-helpers/cecopy-lib.pl 2007-02-14 06:15:49.000000000 -0800
@@ -0,0 +1,208 @@
+# just copy modules
+# TODO: copy tests and try to run them...
+# this file may be used as example on how to use comp.pl
+
+my @files;
+
+my %dirs;
+sub mk {
+  my $r = shift;
+  return if exists $dirs{$r};
+  if ($r=~/\//) {
+    $r=~/^(.*)\/[^\/]*?$/;
+    mk($1);
+  }
+  print STDERR "..\\miniperl.exe -MCross comp.pl --do cemkdir [p]\\lib\\$r\n";
+  system("..\\miniperl.exe -I..\\lib -MCross comp.pl --do cemkdir 
[p]\\lib\\$r");
+  $dirs{$r}++;
+}
+for (@files) {
+  if (/\//) {
+    /^(.*)\/[^\/]*?$/;
+    mk($1);
+  }
+  # currently no stripping POD
+  system("..\\miniperl.exe -I..\\lib -MCross comp.pl --copy pc:..\\lib\\$_ 
ce:[p]\\lib\\$_");
+}
+
+sub BEGIN {
+ @files = qw(
+    attributes.pm
+    AutoLoader.pm
+    AutoSplit.pm
+    autouse.pm
+    base.pm
+    Benchmark.pm
+    bigint.pm
+    bignum.pm
+    bigrat.pm
+    blib.pm
+    bytes.pm
+    Carp.pm
+    charnames.pm
+    Config.pm
+    constant.pm
+    Cwd.pm
+    DB.pm
+    diagnostics.pm
+    Digest.pm
+    DirHandle.pm
+    Dumpvalue.pm
+    DynaLoader.pm
+    English.pm
+    Env.pm
+    Exporter.pm
+    Fatal.pm
+    fields.pm
+    FileCache.pm
+    FileHandle.pm
+    filetest.pm
+    FindBin.pm
+    if.pm
+    integer.pm
+    less.pm
+    locale.pm
+    Memoize.pm
+    NEXT.pm
+    open.pm
+    overload.pm
+    PerlIO.pm
+    re.pm
+    SelectSaver.pm
+    SelfLoader.pm
+    Shell.pm
+    sigtrap.pm
+    sort.pm
+    strict.pm
+    subs.pm
+    Switch.pm
+    Symbol.pm
+    Test.pm
+    Thread.pm
+    UNIVERSAL.pm
+    utf8.pm
+    vars.pm
+    vmsish.pm
+    warnings.pm
+    XSLoader.pm
+    warnings/register.pm
+    Unicode/Collate.pm
+    Unicode/UCD.pm
+    Time/gmtime.pm
+    Time/Local.pm
+    Time/localtime.pm
+    Time/tm.pm
+    Tie/Array.pm
+    Tie/File.pm
+    Tie/Handle.pm
+    Tie/Hash.pm
+    Tie/Memoize.pm
+    Tie/RefHash.pm
+    Tie/Scalar.pm
+    Tie/SubstrHash.pm
+    Text/Abbrev.pm
+    Text/Balanced.pm
+    Text/ParseWords.pm
+    Text/Soundex.pm
+    Text/Tabs.pm
+    Text/Wrap.pm
+    Test/Builder.pm
+    Test/Harness.pm
+    Test/More.pm
+    Test/Simple.pm
+    Test/Harness/Assert.pm
+    Test/Harness/Iterator.pm
+    Test/Harness/Straps.pm
+    Term/ANSIColor.pm
+    Term/Cap.pm
+    Term/Complete.pm
+    Term/ReadLine.pm
+    Search/Dict.pm
+    Pod/Checker.pm
+    Pod/Find.pm
+    Pod/Functions.pm
+    Pod/Html.pm
+    Pod/InputObjects.pm
+    Pod/LaTeX.pm
+    Pod/Man.pm
+    Pod/ParseLink.pm
+    Pod/Parser.pm
+    Pod/ParseUtils.pm
+    Pod/Plainer.pm
+    Pod/Select.pm
+    Pod/Text.pm
+    Pod/Usage.pm
+    Pod/Text/Color.pm
+    Pod/Text/Overstrike.pm
+    Pod/Text/Termcap.pm
+    Math/BigFloat.pm
+    Math/BigInt.pm
+    Math/BigRat.pm
+    Math/Complex.pm
+    Math/Trig.pm
+    Math/BigInt/Calc.pm
+    Math/BigInt/Trace.pm
+    Math/BigFloat/Trace.pm
+    Locale/Constants.pm
+    Locale/Country.pm
+    Locale/Currency.pm
+    Locale/Language.pm
+    Locale/Maketext.pm
+    Locale/Script.pm
+    IPC/Open2.pm
+    IPC/Open3.pm
+    I18N/Collate.pm
+    I18N/LangTags.pm
+    I18N/LangTags/List.pm
+    Hash/Util.pm
+    Getopt/Long.pm
+    Getopt/Std.pm
+    Filter/Simple.pm
+    File/Basename.pm
+    File/CheckTree.pm
+    File/Compare.pm
+    File/Copy.pm
+    File/DosGlob.pm
+    File/Find.pm
+    File/Path.pm
+    File/Spec.pm
+    File/stat.pm
+    File/Temp.pm
+    File/Spec/Functions.pm
+    File/Spec/Mac.pm
+    File/Spec/Unix.pm
+    File/Spec/Win32.pm
+    ExtUtils/Command.pm
+    ExtUtils/Constant.pm
+    ExtUtils/Embed.pm
+    ExtUtils/Install.pm
+    ExtUtils/Installed.pm
+    ExtUtils/Liblist.pm
+    ExtUtils/MakeMaker.pm
+    ExtUtils/Manifest.pm
+    ExtUtils/Miniperl.pm
+    ExtUtils/Mkbootstrap.pm
+    ExtUtils/Mksymlists.pm
+    ExtUtils/MM.pm
+    ExtUtils/MM_Any.pm
+    ExtUtils/MM_DOS.pm
+    ExtUtils/MM_Unix.pm
+    ExtUtils/MM_UWIN.pm
+    ExtUtils/MM_Win32.pm
+    ExtUtils/MM_Win95.pm
+    ExtUtils/MY.pm
+    ExtUtils/Packlist.pm
+    ExtUtils/testlib.pm
+    ExtUtils/Liblist/Kid.pm
+    ExtUtils/Command/MM.pm
+    Exporter/Heavy.pm
+    Devel/SelfStubber.pm
+    Class/ISA.pm
+    Class/Struct.pm
+    Carp/Heavy.pm
+    Attribute/Handlers.pm
+    Attribute/Handlers/demo/Demo.pm
+    Attribute/Handlers/demo/Descriptions.pm
+    Attribute/Handlers/demo/MyClass.pm
+  );
+}

==== //depot/maint-5.8/perl/win32/ce-helpers/comp.pl#1 (text) ====
Index: perl/win32/ce-helpers/comp.pl
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/win32/ce-helpers/comp.pl       2007-02-14 06:15:49.000000000 -0800
@@ -0,0 +1,84 @@
+=comments
+
+helper script to make life for PerlCE easier.
+
+There are different modes for running this script:
+  perl comp.pl --run [any-command-line-arguments]
+and
+  perl comp.pl --do [any-command-line-arguments]
+and
+  perl comp.pl --copy pc:[pc-location] ce:[ce-location]
+
+--run executes this build of perl on CE device with arguments provided
+--run=test will display a predefined messagebox that say everything is ok.
+
+--do  Executes on local computer command that is presented by arguments
+      immediately following after --do
+      Most reason why you may want to execute script in this mode is that
+      arguments preprocessed to replace [p] occurrences into current perl
+      location. Typically it is handy to run
+  perl comp.pl --do cecopy pc:..\lib\Exporter.pm ce:[p]\lib
+
+--copy copies file to CE device
+  here also [p] will be expanded to current PerlCE path, and additionally
+  when --copy=compact specified then, if filename looks like perl module,
+  then POD will be stripped away from that file
+  modules
+
+
+=cut
+
+use strict;
+use Cross;
+use Config;
+
+# edit value of $inst_root variable to reflect your desired location of
+# built perl
+my $inst_root = $Config{prefix};
+
+my %opts = (
+  # %known_opts enumerates allowed opts as well as specifies default and 
initial values
+  my %known_opts = (
+     'do' => '',
+     'run' => '',
+     'copy' => '',
+  ),
+  #options itself
+  my %specified_opts = (
+    (map {/^--([\-_\w]+)=(.*)$/} @ARGV),                            # 
--opt=smth
+    (map {/^no-?(.*)$/i?($1=>0):($_=>1)} map {/^--([\-_\w]+)$/} @ARGV),  # 
--opt --no-opt --noopt
+  ),
+);
+die "option '$_' is not recognized" for grep {!exists $known_opts{$_}} keys 
%specified_opts;
[EMAIL PROTECTED] = grep {!/^--/} @ARGV;
+
+if ($opts{'do'}) {
+  s/\[p\]/$inst_root/g for @ARGV;
+  system(@ARGV);
+}
+elsif ($opts{'run'}) {
+  if ($opts{'run'} eq 'test') {
+    
system("ceexec","$inst_root\\bin\\perl","-we","Win32::MessageBox(\$].qq(\n).join'','cc'..'dx')");
+  }
+  else {
+    system("ceexec","$inst_root\\bin\\perl", map {/^".*"$/s?$_:"\"$_\""} 
@ARGV);
+  }
+}
+elsif ($opts{'copy'}) {
+  if ($opts{'copy'} eq 'compact') {
+    die "todo";
+  }
+  s/\[p\]/$inst_root/g for @ARGV;
+  if ($ARGV[0]=~/^pc:/i) {system("cedel",$ARGV[1])}
+  system("cecopy",@ARGV);
+}
+else {
+  # todo
+}
+
+
+=comments
+
+  Author Vadim Konovalov.
+
+=cut

==== //depot/maint-5.8/perl/win32/ce-helpers/compile-all.bat#1 (text) ====
Index: perl/win32/ce-helpers/compile-all.bat
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/win32/ce-helpers/compile-all.bat       2007-02-14 06:15:49.000000000 
-0800
@@ -0,0 +1,62 @@
[EMAIL PROTECTED] off
+rem
+rem Normally you do not need to run this file.
+rem Instead you should edit and execute compile.bat .
+rem
+rem This file assumes that you have a set of appropriate
+rem bat-files that prepare environment variables for build process
+rem and execute commands passed as arguments
+rem
+
+call wcearm-300 compile.bat "MACHINE=wince-arm-hpc-wce300"
+call wcearm-300 compile.bat "MACHINE=wince-arm-hpc-wce300" zipdist
+..\miniperl makedist.pl --clean-exts
+
+call wcearm-211 compile.bat "MACHINE=wince-arm-hpc-wce211"
+call wcearm-211 compile.bat "MACHINE=wince-arm-hpc-wce211"  zipdist
+..\miniperl makedist.pl --clean-exts
+
+call wcesh3-211 compile.bat "MACHINE=wince-sh3-hpc-wce211"
+call wcesh3-211 compile.bat "MACHINE=wince-sh3-hpc-wce211"  zipdist
+..\miniperl makedist.pl --clean-exts
+
+call wcemips-211 compile.bat "MACHINE=wince-mips-hpc-wce211"
+call wcemips-211 compile.bat "MACHINE=wince-mips-hpc-wce211"  zipdist
+..\miniperl makedist.pl --clean-exts
+
+rem TODO call wcesh3-200 compile.bat "MACHINE=wince-sh3-hpc-wce200"
+rem TODO call wcesh3-200 compile.bat "MACHINE=wince-sh3-hpc-wce200"  zipdist
+rem TODO ..\miniperl makedist.pl --clean-exts
+
+rem TODO call compile.bat "MACHINE=wince-mips-hpc-wce200"
+rem TODO call compile.bat "MACHINE=wince-mips-hpc-wce200"  zipdist
+rem TODO ..\miniperl makedist.pl --clean-exts
+
+call WCEARM-p300 compile.bat "MACHINE=wince-arm-pocket-wce300"
+call WCEARM-p300 compile.bat "MACHINE=wince-arm-pocket-wce300"  zipdist
+..\miniperl makedist.pl --clean-exts
+
+call WCEMIPS-300 compile.bat "MACHINE=wince-mips-pocket-wce300"
+call WCEMIPS-300 compile.bat "MACHINE=wince-mips-pocket-wce300"  zipdist
+..\miniperl makedist.pl --clean-exts
+
+call WCESH3-300 compile.bat "MACHINE=wince-sh3-pocket-wce300"
+call WCESH3-300 compile.bat "MACHINE=wince-sh3-pocket-wce300"  zipdist
+..\miniperl makedist.pl --clean-exts
+
+call WCEx86-300 compile.bat "MACHINE=wince-x86em-pocket-wce300"
+call WCEx86-300 compile.bat "MACHINE=wince-x86em-pocket-wce300"  zipdist
+..\miniperl makedist.pl --clean-exts
+
+call WCEMIPS-palm211 compile.bat "MACHINE=wince-mips-palm-wce211"
+call WCEMIPS-palm211 compile.bat "MACHINE=wince-mips-palm-wce211"  zipdist
+..\miniperl makedist.pl --clean-exts
+
+call WCESH3-palm211 compile.bat "MACHINE=wince-sh3-palm-wce211"
+call WCESH3-palm211 compile.bat "MACHINE=wince-sh3-palm-wce211"  zipdist
+..\miniperl makedist.pl --clean-exts
+
+call WCEx86-palm211 compile.bat "MACHINE=wince-x86em-palm-wce211"
+call WCEx86-palm211 compile.bat "MACHINE=wince-x86em-palm-wce211"  zipdist
+..\miniperl makedist.pl --clean-exts
+

==== //depot/maint-5.8/perl/win32/ce-helpers/compile.bat#1 (text) ====
Index: perl/win32/ce-helpers/compile.bat
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/win32/ce-helpers/compile.bat   2007-02-14 06:15:49.000000000 -0800
@@ -0,0 +1,42 @@
[EMAIL PROTECTED] off
+rem
+rem edit ARG-xxx variable to reflect your system and run
+rem   compile.bat [target] [additional parameters for nmake]
+rem
+
+set ARG-1=PV=
+set ARG-2=INST_VER=
+set ARG-3=INSTALL_ROOT=\Storage Card\perl58m
+set ARG-4=WCEROOT=%SDKROOT%
+set ARG-5=CEPATH=%WCEROOT%
+set ARG-6=CELIBDLLDIR=d:\personal\pocketPC\celib-palm-3.0
+set ARG-7=CECONSOLEDIR=d:\personal\pocketPC\w32console
+
+rem Only for WIN2000
+set ARG-8=YES=/y
+
+set ARG-9=CFG=RELEASE
+
+rem
+rem  uncomment one of following lines that matches your configuration
+
+rem set ARG-10=MACHINE=wince-mips-pocket-wce300
+rem set ARG-10=MACHINE=wince-arm-hpc-wce300
+rem set ARG-10=MACHINE=wince-arm-hpc-wce211
+rem set ARG-10=MACHINE=wince-sh3-hpc-wce211
+rem set ARG-10=MACHINE=wince-mips-hpc-wce211
+rem set ARG-10=MACHINE=wince-sh3-hpc-wce200
+rem set ARG-10=MACHINE=wince-mips-hpc-wce200
+rem set ARG-10=MACHINE=wince-arm-pocket-wce300
+rem set ARG-10=MACHINE=wince-mips-pocket-wce300
+rem set ARG-10=MACHINE=wince-sh3-pocket-wce300
+rem set ARG-10=MACHINE=wince-x86em-pocket-wce300
+rem set ARG-10=MACHINE=wince-mips-palm-wce211
+rem set ARG-10=MACHINE=wince-sh3-palm-wce211
+rem set ARG-10=MACHINE=wince-x86em-palm-wce211
+
+set ARG-11=PERLCEDIR=$(MAKEDIR)
+set ARG-12=MSVCDIR=D:\MSVStudio\VC98
+set ARG-13=CECOPY=$(HPERL) -I$(PERLCEDIR)\lib $(PERLCEDIR)\comp.pl --copy
+
+nmake -f Makefile.ce "%ARG-1%" "%ARG-2%" "%ARG-3%" "%ARG-4%" "%ARG-5%" 
"%ARG-6%" "%ARG-7%" "%ARG-8%" "%ARG-9%" "%ARG-10%" "%ARG-11%" "%ARG-12%" 
"%ARG-13%" %1 %2 %3 %4 %5 %6 %7 %8 %9

==== //depot/maint-5.8/perl/win32/ce-helpers/makedist.pl#1 (text) ====
Index: perl/win32/ce-helpers/makedist.pl
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/win32/ce-helpers/makedist.pl   2007-02-14 06:15:49.000000000 -0800
@@ -0,0 +1,296 @@
+use strict;
+use Cwd;
+use File::Path;
+use File::Find;
+
+my %opts = (
+  #defaults
+    'verbose' => 1, # verbose level, in range from 0 to 2
+    'distdir' => 'distdir',
+    'unicode' => 1, # include unicode by default
+    'minimal' => 0, # minimal possible distribution.
+                    # actually this is just perl.exe and perlXX.dll
+                   # but can be extended by additional exts
+                   #  ... (as soon as this will be implemented :)
+    'cross-name' => 'wince',
+    'strip-pod' => 0, # strip POD from perl modules
+    'adaptation' => 1, # do some adaptation, such as stripping such
+                       # occurences as "if ($^O eq 'VMS'){...}" for 
Dynaloader.pm
+    'zip' => 0,     # perform zip
+    'clean-exts' => 0,
+  #options itself
+    (map {/^--([\-_\w]+)=(.*)$/} @ARGV),                            # 
--opt=smth
+    (map {/^no-?(.*)$/i?($1=>0):($_=>1)} map {/^--([\-_\w]+)$/} @ARGV),  # 
--opt --no-opt --noopt
+  );
+
+# TODO
+#   -- error checking. When something goes wrong, just exit with rc!=0
+#   -- may be '--zip' option should be made differently?
+
+my $cwd = cwd;
+
+if ($opts{'clean-exts'}) {
+  # unfortunately, unlike perl58.dll and like, extensions for different
+  # platforms are built in same directory, therefore we must be able to clean
+  # them often
+  unlink '../config.sh'; # delete cache config file, which remembers our 
previous config
+  chdir '../ext';
+  find({no_chdir=>1,wanted => sub{
+        unlink if /((?:\.obj|\/makefile|\/errno\.pm))$/i;
+      }
+    },'.');
+  exit;
+}
+
+# zip
+if ($opts{'zip'}) {
+  if ($opts{'verbose'} >=1) {
+    print STDERR "zipping...\n";
+  }
+  chdir $opts{'distdir'};
+  unlink <*.zip>;
+  `zip -R perl-$opts{'cross-name'} *`;
+  exit;
+}
+
+my (%libexclusions, %extexclusions);
+my @lfiles;
+sub copy($$);
+
+# lib
+chdir '../lib';
+find({no_chdir=>1,wanted=>sub{push @lfiles, $_ if /\.p[lm]$/}},'.');
+chdir $cwd;
+# exclusions
[EMAIL PROTECTED] = grep {!exists $libexclusions{$_}} @lfiles;
+#inclusions
+#...
+#copy them
+if ($opts{'verbose'} >=1) {
+  print STDERR "Copying perl lib files...\n";
+}
+for (@lfiles) {
+  /^(.*)\/[^\/]+$/;
+  mkpath "$opts{distdir}/lib/$1";
+  copy "../lib/$_", "$opts{distdir}/lib/$_";
+}
+
+#ext
+my @efiles;
+chdir '../ext';
+find({no_chdir=>1,wanted=>sub{push @efiles, $_ if /\.pm$/}},'.');
+chdir $cwd;
+# exclusions
+#...
+#inclusions
+#...
+#copy them
+#{s[/(\w+)/\1\.pm][/$1.pm]} @efiles;
+if ($opts{'verbose'} >=1) {
+  print STDERR "Copying perl core extensions...\n";
+}
+for (@efiles) {
+  if (m#^.*?/lib/(.*)$#) {
+    copy "../ext/$_", "$opts{distdir}/lib/$1";
+  }
+  else {
+    /^(.*)\/([^\/]+)\/([^\/]+)$/;
+    copy "../ext/$_", "$opts{distdir}/lib/$1/$3";
+  }
+}
+my ($dynaloader_pm);
+if ($opts{adaptation}) {
+  # let's copy our Dynaloader.pm (make this optional?)
+  open my $fhdyna, ">$opts{distdir}/lib/Dynaloader.pm";
+  print $fhdyna $dynaloader_pm;
+  close $fhdyna;
+}
+
+# Config.pm, perl binaries
+if ($opts{'verbose'} >=1) {
+  print STDERR "Copying Config.pm, perl.dll and perl.exe...\n";
+}
+copy "../xlib/$opts{'cross-name'}/Config.pm", "$opts{distdir}/lib/Config.pm";
+copy "$opts{'cross-name'}/perl.exe", "$opts{distdir}/bin/perl.exe";
+copy "$opts{'cross-name'}/perl.dll", "$opts{distdir}/bin/perl.dll";
+# how do we know exact name of perl.dll?
+
+# auto
+my %aexcl = (socket=>'Socket_1');
+# Socket.dll and may be some other conflict with same file in \windows dir
+# on WinCE, %aexcl needed to replace it with a different name that however
+# will be found by Dynaloader
+my @afiles;
+chdir "../xlib/$opts{'cross-name'}/auto";
+find({no_chdir=>1,wanted=>sub{push @afiles, $_ if /\.(dll|bs)$/}},'.');
+chdir $cwd;
+if ($opts{'verbose'} >=1) {
+  print STDERR "Copying binaries for perl core extensions...\n";
+}
+for (@afiles) {
+  if (/^(.*)\/(\w+)\.dll$/i && exists $aexcl{lc($2)}) {
+    copy "../xlib/$opts{'cross-name'}/auto/$_", 
"$opts{distdir}/lib/auto/$1/$aexcl{lc($2)}.dll";
+  }
+  else {
+    copy "../xlib/$opts{'cross-name'}/auto/$_", "$opts{distdir}/lib/auto/$_";
+  }
+}
+
+sub copy($$) {
+  my ($fnfrom, $fnto) = @_;
+  open my $fh, "<$fnfrom" or die "can not open $fnfrom: $!";
+  binmode $fh;
+  local $/;
+  my $ffrom = <$fh>;
+  if ($opts{'strip-pod'}) {
+    # actually following regexp is suspicious to not work everywhere.
+    # but we've checked on our set of modules, and it's fit for our purposes
+    $ffrom =~ s/^=\w+.*?^=cut(?:\n|\Z)//msg;
+    unless ($ffrom=~/\bAutoLoader\b/) {
+      # this logic actually strip less than could be stripped, but we're
+      # not risky. Just strip only of no mention of AutoLoader
+      $ffrom =~ s/^__END__.*\Z//msg;
+    }
+  }
+  mkpath $1 if $fnto=~/^(.*)\/([^\/]+)$/;
+  open my $fhout, ">$fnto";
+  binmode $fhout;
+  print $fhout $ffrom;
+  if ($opts{'verbose'} >=2) {
+    print STDERR "copying $fnfrom=>$fnto\n";
+  }
+}
+
+BEGIN {
+%libexclusions = map {$_=>1} split/\s/, <<"EOS";
+abbrev.pl bigfloat.pl bigint.pl bigrat.pl cacheout.pl complete.pl ctime.pl
+dotsh.pl exceptions.pl fastcwd.pl flush.pl ftp.pl getcwd.pl getopt.pl
+getopts.pl hostname.pl look.pl newgetopt.pl pwd.pl termcap.pl
+EOS
+%extexclusions = map {$_=>1} split/\s/, <<"EOS";
+EOS
+$dynaloader_pm=<<'EOS';
+# This module designed *only* for WinCE
+# if you encounter a problem with this file, try using original Dynaloader.pm
+# from perl distribution, it's larger but essentially the same.
+package DynaLoader;
+our $VERSION = 1.04;
+
+$dl_debug ||= 0;
+
[EMAIL PROTECTED] = ();       # names of symbols we need
+
[EMAIL PROTECTED] = (); # things we have loaded
[EMAIL PROTECTED] = (); # Modules we have loaded
+
+boot_DynaLoader('DynaLoader') if defined(&boot_DynaLoader) && 
!defined(&dl_error);
+
+print STDERR "DynaLoader not linked into this perl\n"
+  unless defined(&boot_DynaLoader);
+
+1; # End of main code
+
+sub croak{require Carp;Carp::croak(@_)}
+sub bootstrap_inherit {
+    my $module = $_[0];
+    local *isa = *{"$module\::ISA"};
+    local @isa = (@isa, 'DynaLoader');
+    bootstrap(@_);
+}
+sub bootstrap {
+    # use local vars to enable $module.bs script to edit values
+    local(@args) = @_;
+    local($module) = $args[0];
+    local(@dirs, $file);
+
+    unless ($module) {
+       require Carp;
+       Carp::confess("Usage: DynaLoader::bootstrap(module)");
+    }
+
+    croak("Can't load module $module, dynamic loading not available in this 
perl.\n")
+       unless defined(&dl_load_file);
+
+    my @modparts = split(/::/,$module);
+    my $modfname = $modparts[-1];
+    my $modpname = join('/',@modparts);
+
+    for (@INC) {
+       my $dir = "$_/auto/$modpname";
+       next unless -d $dir;
+       my $try = "$dir/$modfname.dll";
+       last if $file = ( (-f $try) && $try);
+
+       $try = "$dir/${modfname}_1.dll";
+       last if $file = ( (-f $try) && $try);
+       push @dirs, $dir;
+    }
+    $file = dl_findfile(map("-L$_",@dirs,@INC), $modfname) unless $file;
+
+    croak("Can't locate loadable object for module $module in [EMAIL 
PROTECTED] ([EMAIL PROTECTED] contains: @INC)")
+       unless $file;
+
+    (my $bootname = "boot_$module") =~ s/\W/_/g;
+    @dl_require_symbols = ($bootname);
+
+    # optional '.bootstrap' perl script
+    my $bs = $file;
+    $bs =~ s/(\.\w+)?(;\d*)?$/\.bs/;
+    if (-s $bs) { # only read file if it's not empty
+        eval { do $bs; };
+        warn "$bs: [EMAIL PROTECTED]" if $@;
+    }
+
+    my $libref = dl_load_file($file, 0) or
+       croak("Can't load '$file' for module $module: ".dl_error());
+
+    push(@dl_librefs,$libref);  # record loaded object
+
+    my @unresolved = dl_undef_symbols();
+    if (@unresolved) {
+       require Carp;
+       Carp::carp("Undefined symbols present after loading $file: 
@unresolved\n");
+    }
+
+    my $boot_symbol_ref = dl_find_symbol($libref, $bootname) or
+         croak("Can't find '$bootname' symbol in $file\n");
+
+    push(@dl_modules, $module);
+
+  boot:
+    my $xs = dl_install_xsub("${module}::bootstrap", $boot_symbol_ref, $file);
+    &$xs(@args);
+}
+
+sub dl_findfile {
+    my (@args) = @_;
+    my (@dirs,  $dir);
+    my (@found);
+
+    arg: foreach(@args) {
+        if (m:/: && -f $_) {
+           push(@found,$_);
+           last arg unless wantarray;
+           next;
+       }
+
+        if (s:^-L::) {push(@dirs, $_); next;}
+        if (m:/: && -d $_) {push(@dirs, $_); next;}
+
+        for $dir (@dirs) {
+            next unless -d $dir;
+            for my $name (/\.dll$/i?($_):("$_.dll",$_)) {
+                print STDERR " checking in $dir for $name\n" if $dl_debug;
+               if (-f "$dir/$name") {
+                    push(@found, "$dir/$name");
+                    next arg;
+                }
+            }
+        }
+    }
+    return $found[0] unless wantarray;
+    @found;
+}
+EOS
+}
+

==== //depot/maint-5.8/perl/win32/ce-helpers/registry.bat#1 (text) ====
Index: perl/win32/ce-helpers/registry.bat
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/win32/ce-helpers/registry.bat  2007-02-14 06:15:49.000000000 -0800
@@ -0,0 +1,28 @@
[EMAIL PROTECTED] off
+
+::- This script must be executed on the PC with an ActiveSync
+::- connection. If it does not work, create the entries with
+::- a remote registry editor or get a registry editor for your
+::- devices.
+::-
+::- You need my cereg.exe program.
+
+::- My paths...
+set perlexe=\speicherkarte2\bin\perl.exe
+set perllib=\speicherkarte2\usr\lib\perl5
+
+::- PERL5LIB
+cereg -k "HKLM\Environment" -n "PERL5LIB" -v "%perllib%"
+
+::- For ShellExecute
+cereg -k "HKCR\.pl" -n "" -v "perlfile"
+cereg -k "HKCR\perlfile" -n "" -v "Perl Script"
+cereg -k "HKCR\perlfile\DefaultIcon" -n "" -v "%perlexe%,-1"
+
+::- You might need to fix the quotes if your paths contain spaces!
+cereg -k "HKCR\perlfile\Shell\open\command" -n "" -v "%perlexe% %%1"
+
+cereg -k "HKLM\Environment" -n "ROWS" -v "10"
+cereg -k "HKLM\Environment" -n "COLS" -v "75"
+cereg -k "HKLM\Environment" -n "PATH" -v "/Speicherkarte2/bin"
+cereg -k "HKLM\Environment" -n "UNIXROOTDIR" -v "/Speicherkarte2"

==== //depot/maint-5.8/perl/win32/config.ce#3 (text) ====
Index: perl/win32/config.ce
--- perl/win32/config.ce#2~30284~       2007-02-14 05:46:26.000000000 -0800
+++ perl/win32/config.ce        2007-02-14 06:15:49.000000000 -0800
@@ -268,6 +268,7 @@
 d_libm_lib_version='undef'
 d_link='define'
 d_localtime_r='undef'
+d_localtime_r_needs_tzset='undef'
 d_locconv='define'
 d_lockf='undef'
 d_longdbl='undef'
@@ -895,6 +896,7 @@
 sysman='/usr/man/man1'
 tail=''
 tar=''
+targetarch='wince'
 tbl=''
 tee=''
 test=''
@@ -924,7 +926,7 @@
 use5005threads='undef'
 use64bitall='undef'
 use64bitint='undef'
-usecrosscompile='undef'
+usecrosscompile='define'
 usedl='define'
 usefaststdio='define'
 useithreads='~USE_ITHREADS~'

==== //depot/maint-5.8/perl/win32/config_H.ce#2 (text) ====
Index: perl/win32/config_H.ce
--- perl/win32/config_H.ce#1~30282~     2007-02-14 05:38:24.000000000 -0800
+++ perl/win32/config_H.ce      2007-02-14 06:15:49.000000000 -0800
@@ -914,8 +914,8 @@
  *     Perl has been cross-compiled to.  Undefined if not a cross-compile.
  */
 #ifndef USE_CROSS_COMPILE
-/*#define      USE_CROSS_COMPILE       /**/
-#define        PERL_TARGETARCH "undef" /**/
+#define        USE_CROSS_COMPILE       /**/
+#define        PERL_TARGETARCH "wince" /**/
 #endif
 
 /* MULTIARCH:
@@ -1880,6 +1880,12 @@
  *     This symbol, if defined, indicates that the localtime_r routine
  *     is available to localtime re-entrantly.
  */
+/* LOCALTIME_R_NEEDS_TZSET:
+ *     Many libc's localtime_r implementations do not call tzset,
+ *     making them differ from localtime(), and making timezone
+ *     changes using $ENV{TZ} without explicitly calling tzset
+ *     impossible. This symbol makes us call tzset before localtime_r
+ */
 /* LOCALTIME_R_PROTO:
  *     This symbol encodes the prototype of localtime_r.
  *     It is zero if d_localtime_r is undef, and one of the
@@ -1887,6 +1893,7 @@
  *     is defined.
  */
 /*#define HAS_LOCALTIME_R         /**/
+/*#define LOCALTIME_R_NEEDS_TZSET         /**/
 #define LOCALTIME_R_PROTO 0       /**/
 
 /* HAS_LONG_DOUBLE:

==== //depot/maint-5.8/perl/win32/perllib.c#6 (text) ====
Index: perl/win32/perllib.c
--- perl/win32/perllib.c#5~30281~       2007-02-14 05:33:27.000000000 -0800
+++ perl/win32/perllib.c        2007-02-14 06:15:49.000000000 -0800
@@ -51,7 +51,7 @@
     dTHX;
     if (host_perl != my_perl) {
        int *nowhere = NULL;
-#ifdef _WIN_CE
+#ifdef UNDER_CE
        printf(" ... bad in win32_checkTLS\n");
        printf("  %08X ne %08X\n",host_perl,my_perl);
 #endif

==== //depot/maint-5.8/perl/win32/perlmaince.c#1 (text) ====
Index: perl/win32/perlmaince.c
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/win32/perlmaince.c     2007-02-14 06:15:49.000000000 -0800
@@ -0,0 +1,40 @@
+/* Time-stamp: <01/08/01 20:58:19 [EMAIL PROTECTED]> */
+
+#include "EXTERN.h"
+#include "perl.h"
+
+#ifdef __GNUC__
+
+/* Mingw32 defaults to globing command line 
+ * This is inconsistent with other Win32 ports and 
+ * seems to cause trouble with passing -DXSVERSION=\"1.6\" 
+ * So we turn it off like this:
+ */
+int _CRT_glob = 0;
+
+#endif
+
+/* Called from w32console/wmain.c */
+
+extern int w32console_usefunctionkeys;
+
+int
+main(int argc, char **argv, char **env)
+{
+  int res;
+
+  if(argc == 1)
+    XCEShowMessageA("Starting perl with no args is currently\r\n"
+                   "not useful on Windows CE");
+
+  w32console_usefunctionkeys = 0; /* this allows backspace key to work */
+
+  res = RunPerl(argc, argv, env);
+
+  if(res != 0)
+    XCEShowMessageA("Exitcode: %d", res);
+
+  return res;
+}
+
+

==== //depot/maint-5.8/perl/win32/vmem.h#4 (text) ====
Index: perl/win32/vmem.h
--- perl/win32/vmem.h#3~30281~  2007-02-14 05:33:27.000000000 -0800
+++ perl/win32/vmem.h   2007-02-14 06:15:49.000000000 -0800
@@ -21,7 +21,7 @@
 #ifndef ___VMEM_H_INC___
 #define ___VMEM_H_INC___
 
-#ifndef _WIN_CE
+#ifndef UNDER_CE
 #define _USE_MSVCRT_MEM_ALLOC
 #endif
 #define _USE_LINKED_LIST

==== //depot/maint-5.8/perl/win32/win32.h#13 (text) ====
Index: perl/win32/win32.h
--- perl/win32/win32.h#12~30282~        2007-02-14 05:38:24.000000000 -0800
+++ perl/win32/win32.h  2007-02-14 06:15:49.000000000 -0800
@@ -567,7 +567,7 @@
 DllExport void *win32_signal_context(void);
 #define PERL_GET_SIG_CONTEXT win32_signal_context()
 
-#ifdef _WIN_CE
+#ifdef UNDER_CE
 #define Win_GetModuleHandle   XCEGetModuleHandleA
 #define Win_GetProcAddress    XCEGetProcAddressA
 #define Win_GetModuleFileName XCEGetModuleFileNameA

==== //depot/maint-5.8/perl/win32/wince.c#3 (text) ====
Index: perl/win32/wince.c
--- perl/win32/wince.c#2~30284~ 2007-02-14 05:46:26.000000000 -0800
+++ perl/win32/wince.c  2007-02-14 06:15:49.000000000 -0800
@@ -2660,7 +2660,9 @@
 DllExport void
 Perl_win32_term(void)
 {
+    dTHX;
     OP_REFCNT_TERM;
+    PERLIO_TERM;
     MALLOC_TERM;
 }
 
End of Patch.

Reply via email to