diff options
-rw-r--r-- | MANIFEST | 6 | ||||
-rw-r--r-- | README.ce | 74 | ||||
-rw-r--r-- | dosish.h | 5 | ||||
-rw-r--r-- | wince/Makefile.ce | 307 | ||||
-rw-r--r-- | wince/compile-all.bat | 13 | ||||
-rw-r--r-- | wince/compile.bat | 25 | ||||
-rw-r--r-- | wince/config.ce | 2 | ||||
-rw-r--r-- | wince/include/sys/stat.h | 55 | ||||
-rw-r--r-- | wince/makedist.pl | 116 | ||||
-rw-r--r-- | wince/xbuildall.ksh | 29 | ||||
-rw-r--r-- | wince/xdistclean.ksh | 4 | ||||
-rw-r--r-- | wince/xmakediffs.ksh | 8 |
12 files changed, 258 insertions, 386 deletions
@@ -2860,6 +2860,7 @@ wince/bin/search.pl WinCE port wince/cecopy-lib.pl WinCE port wince/comp.pl WinCE port wince/compile.bat WinCE port +wince/compile-all.bat WinCE port wince/config.ce WinCE port wince/config_H.ce WinCE port wince/config_h.PL WinCE port @@ -2868,9 +2869,9 @@ wince/dl_win32.xs WinCE port wince/include/arpa/inet.h WinCE port wince/include/netdb.h WinCE port wince/include/sys/socket.h WinCE port -wince/include/sys/stat.h WinCE port wince/Makefile.ce WinCE port wince/makeico.pl WinCE port +wince/makedist.pl WinCE port wince/perl.rc WinCE port wince/perllib.c WinCE port wince/perlmain.c WinCE port @@ -2887,9 +2888,6 @@ wince/win32thread.h WinCE port wince/wince.c WinCE port wince/wince.h WinCE port wince/wincesck.c WinCE port -wince/xbuildall.ksh WinCE port -wince/xdistclean.ksh WinCE port -wince/xmakediffs.ksh 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 @@ -8,52 +8,84 @@ Perl for WinCE =head1 Description -This file gives the instructions for building Perl5.6 and above for +This file gives the instructions for building Perl5.8 and above for WinCE. Please read and understand the terms under which this software is distributed. =head1 Build This section describes the steps to be performed to build PerlCE. +You may find additional and newer information about building perl +for WincE using following URL: + + http://perlce.sourceforge.net + +There should also be pre-built binaries there. =head2 Tools & SDK -For compiling, you need Microsoft Embedded Visual Tools, my -celib-sources, my console-sources and a perl for win32. +For compiling, you need following: + +=over 4 + +=item * Microsoft Embedded Visual Tools + +=item * Microsoft Visual C++ + +=item * Rainer Keuchel's celib-sources + +=item * Rainer Keuchel's console-sources + +=back Needed source files can be downloaded via: www.rainer-keuchel.de/wince/dirlist.html -Some portions of the makefile need a shell for win32, rm, cp, mv, -xmkdir (mkdir with a -p option). It also uses my cecopy program for -copying files to the ce device. - =head2 Make -Miniperl is not built. A pre-existent win32 perl is used. +Please pay attention that starting from 5.8.0 miniperl *is* built +and it facilitates in further building process. This means that +in addition to compiler installation for mobile device you also need +to have Microsoft Visual C++ installed as well. -The paths for tools and additional libraries have to be changed in -wince/makefile.ce. +On the bright side, you do not need to edit any files from ./win32 +subdirectory. Normally you only need to edit ./wince/compile.bat +to reflect your system and run it. -Different ce targets can be specified with the TARGET macro. +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 +arguments. You should pass target this way. -Before you start, you need to build celib.dll and w32console. -See instructions in these packages for building. +Currently default target build all required perls, also there exists +target 'dist' that prepares distribution file set. Other targets +are currently in development stage. + +So, to prepare distribution you need to do following: + +=over 4 + +=item * go to ./wince subdirectory + +=item * edit file compile.bat -In the wince directory, type "nmake -f makefile.ce". This should -build perl.exe and perl.dll. For building extension dlls, -type "nmake -f makefile.ce dlls" +=item * run + compile.bat -When building ext dlls, you get lots of macro redefinition -errors. Just ignore them. +=item * run + compile.bat dist -For further information, look in the text files in the wince -sub-directory. +=back + +Before you start, you need to build celib.dll and w32console. +See instructions in these packages for building. =head1 Acknowledgements The port for Win32 was used as a reference. -=head1 Author +=head1 AUTHORS Rainer Keuchel (keuchel@netwave.de) +Vadim Konovalov (vkonovalov@spb.lucent.com) + @@ -6,7 +6,6 @@ * License or the Artistic License, as specified in the README file. * */ - #define ABORT() abort(); #ifndef SH_PATH @@ -79,8 +78,12 @@ #if defined(WIN64) || defined(USE_LARGE_FILES) #define Stat_t struct _stati64 #else +#if defined(UNDER_CE) +#define Stat_t struct xcestat +#else #define Stat_t struct stat #endif +#endif /* USE_STAT_RDEV: * This symbol is defined if this system has a stat structure declaring diff --git a/wince/Makefile.ce b/wince/Makefile.ce index 9a0018a20a..d02f1a4717 100644 --- a/wince/Makefile.ce +++ b/wince/Makefile.ce @@ -49,6 +49,14 @@ CECOPY = cecopy # encodings and may see lower IO performance. You have been warned. USE_PERLIO = define +# +# set this if you wish to use perl's malloc +# This will make perl run few times faster +# WARNING: Turning this on/off WILL break binary compatibility with extensions +# you may have compiled with/without it. +# +PERL_MALLOC = define + NOOP = @echo # keep this untouched! @@ -74,6 +82,12 @@ MACHINE=wince-arm-hpc-wce300 #MACHINE=wince-x86em-palm-wce211 !endif +# set this to your email address +# +#EMAIL = + +##################### CHANGE THESE ONLY IF YOU MUST ##################### + ###################################################################### # machines @@ -291,7 +305,7 @@ PLATFORM = MS Pocket PC MCFLAGS = -D _MT -D _DLL -DSH3 -D_SH3_ -DSHx -DPROCESSOR_SH3 \ -DPALM_SIZE -DPOCKET_SIZE \ -I $(CELIBDLLDIR)\inc -MACH = -machine:mips +MACH = -machine:sh3 SUBSYS = -subsystem:windowsce,3.00 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release LDLIBPATH = -libpath:$(CELIBPATH) @@ -335,7 +349,7 @@ CECFLAGS = $(CECFLAGS) -Zi -Od !if "$(CFG)" == "RELEASE" # -O2 and -Ot give internal compiler error in perl.c and lexer. # Also the dll cannot be loaded by perl.exe... -CECFLAGS = $(CECFLAGS) +CECFLAGS = $(CECFLAGS) -O2 -Ot !endif RCDEFS = /l 0x407 /r /d "UNICODE" /d UNDER_CE=$(CEVersion) \ @@ -362,7 +376,6 @@ LIB=$(WCEROOT)\$(OSVERSION)\$(PLATFORM)\lib\$(ARCH) BUILDOPT = $(BUILDOPT) $(CECFLAGS) -##################### CHANGE THESE ONLY IF YOU MUST ##################### !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == "" D_CRYPT = undef @@ -375,10 +388,6 @@ CRYPT_FLAG = -DHAVE_DES_FCRYPT PERL_MALLOC = undef !ENDIF -!IF "$(USE_IMP_SYS)" == "define" -PERL_MALLOC = undef -!ENDIF - !IF "$(USE_MULTI)" == "" USE_MULTI = undef !ENDIF @@ -420,7 +429,7 @@ BUILDOPT = $(BUILDOPT) -DUSE_PERLIO !ENDIF !IF "$(CROSS_NAME)" == "" -CROSS_NAME = wince +CROSS_NAME = $(MACHINE) !ENDIF # new option - automatically defined in perl.h... @@ -477,6 +486,8 @@ LINK_FLAGS = -nologo -machine:$(PROCESSOR_ARCHITECTURE) !if "$(CFG)" == "DEBUG" LINK_FLAGS = $(LINK_FLAGS) -debug:full -pdb:none +!else +LINK_FLAGS = $(LINK_FLAGS) -release !endif OBJOUT_FLAG = -Fo @@ -627,6 +638,26 @@ CORE_NOCFG_H = \ .\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 @@ -636,81 +667,11 @@ DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \ Sys/Hostname STATIC_EXT = DynaLoader -NONXS_EXT = Errno DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader -SOCKET = $(EXTDIR)\Socket\Socket -IO = $(EXTDIR)\IO\IO -DUMPER = $(EXTDIR)\Data\Dumper\Dumper -# -FCNTL = $(EXTDIR)\Fcntl\Fcntl -OPCODE = $(EXTDIR)\Opcode\Opcode -SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File -POSIX = $(EXTDIR)\POSIX\POSIX -ATTRS = $(EXTDIR)\attrs\attrs -THREAD = $(EXTDIR)\Thread\Thread -B = $(EXTDIR)\B\B -RE = $(EXTDIR)\re\re -ERRNO = $(EXTDIR)\Errno\Errno -PEEK = $(EXTDIR)\Devel\Peek\Peek -BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader -DPROF = $(EXTDIR)\Devel\DProf\DProf -GLOB = $(EXTDIR)\File\Glob\Glob -HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname -SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll -FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll -OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll -SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll -IO_DLL = $(AUTODIR)\IO\IO.dll -POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll -ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll -THREAD_DLL = $(AUTODIR)\Thread\Thread.dll -B_DLL = $(AUTODIR)\B\B.dll -DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll -PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll -RE_DLL = $(AUTODIR)\re\re.dll -BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll -DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll -GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll -HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll ERRNO_PM = $(LIBDIR)\Errno.pm -EXTENSION_C = \ - $(SOCKET).c \ - $(FCNTL).c \ - $(OPCODE).c \ - $(SDBM_FILE).c \ - $(IO).c \ - $(POSIX).c \ - $(ATTRS).c \ - $(THREAD).c \ - $(RE).c \ - $(DUMPER).c \ - $(PEEK).c \ - $(B).c \ - $(BYTELOADER).c \ - $(DPROF).c \ - $(GLOB).c \ - $(HOSTNAME).c - -EXTENSION_DLL = \ - $(SOCKET_DLL) \ - $(FCNTL_DLL) \ - $(OPCODE_DLL) \ - $(SDBM_FILE_DLL)\ - $(IO_DLL) \ - $(POSIX_DLL) \ - $(ATTRS_DLL) \ - $(DUMPER_DLL) \ - $(PEEK_DLL) \ - $(B_DLL) \ - $(RE_DLL) \ - $(THREAD_DLL) \ - $(BYTELOADER_DLL) \ - $(DPROF_DLL) \ - $(GLOB_DLL) \ - $(HOSTNAME_DLL) EXTENSION_PM = \ $(ERRNO_PM) @@ -729,7 +690,7 @@ CFG_VARS = \ "CC=$(CC)" \ "ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT)" \ "cf_by=Rainer Keuchel" \ - "cf_email=coyxc@rainer-keuchel.de" \ + "cf_email=$(EMAIL)" \ "d_crypt=$(D_CRYPT)" \ "d_mymalloc=$(PERL_MALLOC)" \ "libs=$(LIBFILES)" \ @@ -740,7 +701,6 @@ CFG_VARS = \ "make=nmake" \ "static_ext=$(STATIC_EXT)" \ "dynamic_ext=$(DYNAMIC_EXT)" \ - "nonxs_ext=$(NONXS_EXT)" \ "useithreads=$(USE_ITHREADS)" \ "usemultiplicity=$(USE_MULTI)" \ "useperlio=$(USE_PERLIO)" \ @@ -796,115 +756,13 @@ $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs #---------------------------------------------------------------------------------- Extensions: ..\win32\buildext.pl $(PERLDEP) $(CONFIGPM) $(HPERL) -I..\lib -I..\win32 -MCross=$(CROSS_NAME) ..\win32\buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) \ - !File/Glob !POSIX !Time/HiRes + !POSIX !Time/HiRes Extensions_clean: -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean #---------------------------------------------------------------------------------- -$(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs - cd $(EXTDIR)\Data\$(*B) - $(HPERL) -I..\..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\..\wince - -$(DPROF_DLL): $(PERLEXE) $(DPROF).xs - cd $(EXTDIR)\Devel\$(*B) - $(HPERL) -I..\..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\..\wince - -$(GLOB_DLL): $(PERLEXE) $(GLOB).xs - cd $(EXTDIR)\File\$(*B) - $(HPERL) -I..\..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\..\wince - -$(PEEK_DLL): $(PERLEXE) $(PEEK).xs - cd $(EXTDIR)\Devel\$(*B) - $(HPERL) -I..\..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\..\wince - -$(RE_DLL): $(PERLEXE) $(RE).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(B_DLL): $(PERLEXE) $(B).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(THREAD_DLL): $(PERLEXE) $(THREAD).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(POSIX_DLL): $(PERLEXE) $(POSIX).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(IO_DLL): $(PERLEXE) $(IO).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(HOSTNAME_DLL): $(PERLEXE) $(HOSTNAME).xs - cd $(EXTDIR)\Sys\$(*B) - $(HPERL) -I..\..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\..\wince - -$(BYTELOADER_DLL): $(PERLEXE) $(BYTELOADER).xs - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - -$(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL - cd $(EXTDIR)\$(*B) - $(HPERL) -I..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl - $(MAKE) - cd ..\..\wince - $(PERLEXE_RES): perl.rc perl.ico rc $(RCDEFS) perl.rc @@ -917,81 +775,6 @@ clean: -rm -f ../config.sh ../lib/Config.pm -rm -f config.h perl.res -!IF "$(MACHINE)" == "wince-sh3-hpc" - -install_perlexe: $(PERLEXE) - cedel /speicherkarte2/bin/perl.exe - $(CECOPY) pc:../perl.exe ce:$(INSTALL_ROOT)/bin - -install_perldll: $(PERLDLL) - cedel /speicherkarte2/bin/perl$(PV).dll - $(CECOPY) pc:../perl$(PV).dll ce:/speicherkarte2/bin - -install_perl: install_perlexe install_perldll - -test_perl: - $(CECOPY) pc:test.pl ce:/speicherkarte2/bin - ceexec /speicherkarte2/bin/perl.exe /speicherkarte2/bin/test.pl - -install_lib: ../lib/Config.pm - $(CECOPY) pc:../lib/Config.pm ce:$(INSTALL_ROOT)/lib - -!ELSEIF "$(MACHINE)" == "wince-arm-hpc" - -install_perlexe: $(PERLEXE) - -cedel /speicherkarte/bin/perl.exe - $(CECOPY) pc:$(MACHINE)/perl.exe ce:$(INSTALL_ROOT)/bin - -install_perldll: $(PERLDLL) - -cedel /speicherkarte/bin/perl$(PV).dll - $(CECOPY) pc:$(MACHINE)/perl$(PV).dll ce:$(INSTALL_ROOT)/bin - -install_perl: install_perlexe install_perldll - -test_perl: - $(CECOPY) pc:test.pl ce:/speicherkarte/bin - ceexec /speicherkarte/bin/perl.exe /speicherkarte/bin/test.pl - -install_lib: ../lib/Config.pm - $(CECOPY) pc:../lib/Config.pm ce:$(INSTALL_ROOT)/lib - -!ELSEIF "$(MACHINE)" == "wince-mips-hpc" - -install_perlexe: $(PERLEXE) - $(CECOPY) pc:../perl.exe ce:$(INSTALL_ROOT)/bin - -install_perldll: $(PERLDLL) - $(CECOPY) pc:../perl$(PV).dll ce:$(INSTALL_ROOT)/bin - -install_perl: install_perlexe install_perldll - -test_perl: - $(CECOPY) pc:test.pl ce:/netzwerk/compaq/bin - ceexec /netzwerk/compaq/bin/perl.exe $(INSTALL_ROOT)/test.pl - -install_lib: ../lib/Config.pm - $(CECOPY) pc:../lib/Config.pm ce:$(INSTALL_ROOT)/lib - -!ELSEIF "$(MACHINE)" == "wince-x86em-pocket" - -install_lib: - ftpcopy ../lib/Config.pm ftp!ftp@localhost:/perl/lib - ftpcopy ../lib/Exporter.pm ftp!ftp@localhost:/perl/lib - ftpcopy ../lib/Exporter/Heavy.pm ftp!ftp@localhost:/perl/lib/Exporter - -install_perlexe: $(PERLEXE) - $(CECOPY) pc:../perl.exe ce:$(INSTALL_ROOT)/bin - -install_perldll: $(PERLDLL) - $(CECOPY) pc:../perl$(PV).dll ce:$(INSTALL_ROOT)/bin - -install_perl: install_perlexe install_perldll - -test_perl: - echo Not yet -!ENDIF - - XDLLOBJS = \ $(DLLDIR)\av.obj \ $(DLLDIR)\deb.obj \ @@ -1034,6 +817,9 @@ $(DLLDIR)\wincesck.obj \ $(DLLDIR)\xsutils.obj \ $(DLLDIR)\perllib.obj \ $(DLLDIR)\DynaLoader.obj +!IF "$(PERL_MALLOC)" == "define" +XDLLOBJS = $(XDLLOBJS) $(DLLDIR)\malloc.obj +!ENDIF {$(SRCDIR)}.c{$(DLLDIR)}.obj: $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ $< @@ -1063,7 +849,7 @@ $(MACHINE)\perlmain.obj $(PERLEXE) : $(PERLDLL) $(CONFIGPM) $(XPERLEXEOBJS) $(PERLEXE_RES) $(STARTOBJS) $(XCOPY) $(MACHINE)\*.lib $(XCOREDIR) - $(LINK32) $(SUBSYS) $(LDLIBPATH) \ + $(LINK32) $(SUBSYS) $(LDLIBPATH) \ -entry:wWinMainCRTStartup \ -out:$(MACHINE)\perl.exe \ -stack:0x100000 $(LINK_FLAGS) $(STARTOBJS) $(XPERLEXEOBJS) \ @@ -1115,6 +901,9 @@ install: all $(CECOPY) "pc:../xlib/$(CROSS_NAME)/Config.pm" "ce:$(INSTALL_ROOT)/lib" !endif +dist: all + $(HPERL) -I..\lib -MCross=$(CROSS_NAME) makedist.pl --distdir=dist-$(CROSS_NAME) + perl.ico: $(HPERL) makeico.pl diff --git a/wince/compile-all.bat b/wince/compile-all.bat new file mode 100644 index 0000000000..5f94d44317 --- /dev/null +++ b/wince/compile-all.bat @@ -0,0 +1,13 @@ +call compile.bat MACHINE=wince-arm-hpc-wce300
+call compile.bat MACHINE=wince-arm-hpc-wce211
+call compile.bat MACHINE=wince-sh3-hpc-wce211
+call compile.bat MACHINE=wince-mips-hpc-wce211
+call compile.bat MACHINE=wince-sh3-hpc-wce200
+call compile.bat MACHINE=wince-mips-hpc-wce200
+call compile.bat MACHINE=wince-arm-pocket-wce300
+call compile.bat MACHINE=wince-mips-pocket-wce300
+call compile.bat MACHINE=wince-sh3-pocket-wce300
+call compile.bat MACHINE=wince-x86em-pocket-wce300
+call compile.bat MACHINE=wince-mips-palm-wce211
+call compile.bat MACHINE=wince-sh3-palm-wce211
+call compile.bat MACHINE=wince-x86em-palm-wce211
diff --git a/wince/compile.bat b/wince/compile.bat index 851c68fb06..73c731f5a1 100644 --- a/wince/compile.bat +++ b/wince/compile.bat @@ -6,7 +6,7 @@ rem set ARG-1=PV= set ARG-2=INST_VER= -set ARG-3=INSTALL_ROOT=\Storage Card\perl58 +set ARG-3=INSTALL_ROOT=\Storage Card\perl-tests\perl@19041 set ARG-4=WCEROOT=%SDKROOT% set ARG-5=CEPATH=%WCEROOT% set ARG-6=CELIBDLLDIR=d:\personal\pocketPC\celib-palm-3.0 @@ -16,10 +16,27 @@ rem Only for WIN2000 set ARG-8=YES=/y set ARG-9=CFG=RELEASE -set ARG-10=MACHINE=wince-mips-pocket-wce300 + +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 -set ARG-14= -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%" "%ARG-14%" %1 %2 %3 %4 %5 %6 %7 %8 %9 +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 diff --git a/wince/config.ce b/wince/config.ce index 1d7e8b3780..08424f03a6 100644 --- a/wince/config.ce +++ b/wince/config.ce @@ -276,7 +276,7 @@ d_msgrcv='undef' d_msgsnd='undef' d_msync='undef' d_munmap='undef' -d_mymalloc='undef' +d_mymalloc='~PERL_MALLOC~' d_nanosleep='undef' d_nice='undef' d_nv_preserves_uv='define' diff --git a/wince/include/sys/stat.h b/wince/include/sys/stat.h deleted file mode 100644 index 2f5c6348d5..0000000000 --- a/wince/include/sys/stat.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef SYS_STAT_H -#define SYS_STAT_H 1 - -#include <sys/types.h> - -/* stat.h */ -#define _S_IFMT 0170000 /* file type mask */ -#define _S_IFDIR 0040000 /* directory */ -#define _S_IFCHR 0020000 /* character special */ -#define _S_IFIFO 0010000 /* pipe */ -#define _S_IFREG 0100000 /* regular */ -#define _S_IREAD 0000400 /* read permission, owner */ -#define _S_IWRITE 0000200 /* write permission, owner */ -#define _S_IEXEC 0000100 /* execute/search permission, owner */ - -#define _S_IFMT 0170000 /* file type mask */ -#define _S_IFDIR 0040000 /* directory */ -#define _S_IFCHR 0020000 /* character special */ -#define _S_IFIFO 0010000 /* pipe */ -#define _S_IFREG 0100000 /* regular */ -#define _S_IREAD 0000400 /* read permission, owner */ -#define _S_IWRITE 0000200 /* write permission, owner */ -#define _S_IEXEC 0000100 /* execute/search permission, owner */ - -#define S_IFMT _S_IFMT -#define S_IFREG _S_IFREG -#define S_IFCHR _S_IFCHR -#define S_IFDIR _S_IFDIR -#define S_IREAD _S_IREAD -#define S_IWRITE _S_IWRITE -#define S_IEXEC _S_IEXEC - -#ifndef S_ISDIR -#define S_ISDIR(X) (((X) & S_IFMT) == S_IFDIR) -#endif -#ifndef S_ISREG -#define S_ISREG(X) (((X) & S_IFMT) == S_IFREG) -#endif - -struct stat -{ - dev_t st_dev; - ino_t st_ino; - unsigned short st_mode; - short st_nlink; - short st_uid; - short st_gid; - dev_t st_rdev; - off_t st_size; - time_t st_atime; - time_t st_mtime; - time_t st_ctime; -}; - -#endif diff --git a/wince/makedist.pl b/wince/makedist.pl new file mode 100644 index 0000000000..5729922412 --- /dev/null +++ b/wince/makedist.pl @@ -0,0 +1,116 @@ +use strict; +use Cwd; +use File::Path; +use File::Find; + +my %opts = ( + #defaults + '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 :) + 'include-modules' => '', # TODO + 'exclude-modules' => '', # TODO + #??? 'only-modules' => '', # TODO + 'platform' => 'wince', + 'strip-pod' => 0, # TODO strip POD from perl modules + 'adaptation' => 0, # TODO do some adaptation, such as stripping such + # occurences as "if ($^O eq 'VMS'){...}" for certain modules + 'zip' => 0, # perform zip (TODO) + '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 + +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; +} + +my (%libexclusions, %extexclusions); +my @lfiles; +sub copy($$); + +# lib +chdir '../lib'; +find({no_chdir=>1,wanted=>sub{push @lfiles, $_ if /\.p[lm]$/}},'.'); +chdir $cwd; +# exclusions +@lfiles = grep {!exists $libexclusions{$_}} @lfiles; +#inclusions +#... +#copy them +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; +for (@efiles) { + /^(.*)\/([^\/]+)\/([^\/]+)$/; + copy "../ext/$_", "$opts{distdir}/lib/$1/$3"; +} + +# Config.pm +copy "../xlib/$opts{platform}/Config.pm", "$opts{distdir}/lib/Config.pm"; + +# auto +my @afiles; +chdir "../xlib/$opts{platform}/auto"; +find({no_chdir=>1,wanted=>sub{push @afiles, $_ if /\.(dll|bs)$/}},'.'); +chdir $cwd; +for (@afiles) { + copy "../xlib/$opts{platform}/auto/$_", "$opts{distdir}/lib/auto/$_"; +} + +sub copy { + my ($fnfrom, $fnto) = @_; + my $ffrom = do {local (@ARGV,$/) = $fnfrom; <>}; + 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; + # $ffrom =~ s/^__END__.*\Z//msg; # TODO -- deal with Autoload + } + mkpath $1 if $fnto=~/^(.*)\/([^\/]+)$/; + open my $fhout, ">$fnto"; + print $fhout $ffrom; +} + +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 + +} + diff --git a/wince/xbuildall.ksh b/wince/xbuildall.ksh deleted file mode 100644 index 5b35bc36bd..0000000000 --- a/wince/xbuildall.ksh +++ /dev/null @@ -1,29 +0,0 @@ -# Time-stamp: <01/08/01 21:03:25 keuchel@w2k> -# -# rebuild all perl targets - -machines=" -wince-arm-hpc-wce300 -wince-arm-hpc-wce211 -wince-sh3-hpc-wce211 -wince-mips-hpc-wce211 -wince-mips-hpc-wce200 -wince-sh3-hpc-wce200 -wince-arm-pocket-wce300 -wince-mips-pocket-wce300 -wince-sh3-pocket-wce300 -wince-x86em-pocket-wce300 -wince-sh3-palm-wce211 -wince-mips-palm-wce211 -wince-x86em-palm-wce211 -" - -for mach in $machines; do - mflags="-f makefile.ce MACHINE=$mach" - echo "Calling nmake for $mach..." - nmake $mflags clean - nmake $mflags all - nmake $mflags all dlls || exit 1 - nmake $mflags makedist -done - diff --git a/wince/xdistclean.ksh b/wince/xdistclean.ksh deleted file mode 100644 index bdb6b421e8..0000000000 --- a/wince/xdistclean.ksh +++ /dev/null @@ -1,4 +0,0 @@ -tdirs=`xfind . -type d -name 'wince-*'` -test "$tdirs" = "" || rm -rf $dirs -rm -f *.res *.pdb *~ - diff --git a/wince/xmakediffs.ksh b/wince/xmakediffs.ksh deleted file mode 100644 index 637d10bea6..0000000000 --- a/wince/xmakediffs.ksh +++ /dev/null @@ -1,8 +0,0 @@ -cd h:/src - -files="perl.c perlio.c perl.h" - -for f in $files; do - diff -c vc/perl/$f wince/perl/$f -done - |