3 # Copyright (c) 2004-2005 Nokia. All rights reserved.
4 # This utility is licensed under the same terms as Perl itself.
9 print "Configuring...\n";
10 print "Configuring with: Perl version $] ($^X)\n";
12 do "sanity.pl" or die $@;
14 my %VERSION = %{ do "version.pl" or die $@ };
16 printf "Configuring for: Perl version $VERSION{REVISION}.%03d%03d\n",
17 $VERSION{VERSION}, $VERSION{SUBVERSION};
19 my $VERSION = "$VERSION{REVISION}$VERSION{VERSION}$VERSION{SUBVERSION}";
20 my $R_V_SV = "$VERSION{REVISION}.$VERSION{VERSION}.$VERSION{SUBVERSION}";
22 my ($SYMBIAN_ROOT, $SYMBIAN_VERSION, $SDK_NAME, $SDK_VARIANT, $SDK_VERSION) =
23 @{ do "sdk.pl" or die $@ };
24 my %PORT = %{ do "port.pl" or die $@ };
26 if ($SYMBIAN_ROOT eq 'C:\Symbian\Series60_1_2_CW') {
27 ( $SYMBIAN_VERSION, $SDK_VERSION ) = qw(6.1 1.2);
30 my $WIN = $ENV{WIN} ; # 'wins', 'winscw' (from sdk.pl)
31 my $ARM = 'thumb'; # 'thumb', 'armv5'
32 my $S60SDK = $ENV{S60SDK}; # qw(1.2 2.0 2.1 2.6) (from sdk.pl)
33 if ($SDK_VARIANT eq 'S60' && $S60SDK =~ /^5\./) {
34 $ARM = 'armv5'; # 'thumb', 'armv5' # Configuration for S60 5th Edition SDK v1.0
36 my $S80SDK = $ENV{S80SDK}; # qw(2.0) (from sdk.pl)
37 my $S90SDK = $ENV{S90SDK}; # qw(1.1) (from sdk.pl)
38 my $UIQSDK = $ENV{UIQSDK}; # qw(2.0 2.1) (from sdk.pl)
40 my $UREL = $ENV{UREL}; # from sdk.pl
41 $UREL =~ s/-ARM-/$ARM/;
42 my $UARM = $ENV{UARM}; # from sdk.pl
44 die "$0: SDK not recognized\n"
45 if !defined($SYMBIAN_VERSION) ||
46 !defined($SDK_VERSION) ||
47 (!defined($S60SDK) && !defined($S80SDK) && !defined($S90SDK) && !defined($UIQSDK));
49 die "$0: does not know which Windows compiler to use\n"
52 print "Symbian $SYMBIAN_VERSION SDK $SDK_VARIANT $SDK_VERSION ($WIN) installed at $SYMBIAN_ROOT\n";
54 my $CWD = do "cwd.pl" or die $@;
55 print "Build directory $CWD\n";
57 die "$0: '+' in cwd does not work with Series 60 SDK 1.2\n"
58 if defined $S60SDK && $S60SDK eq '1.2' && $CWD =~ /\+/;
64 my ( $target, $type, @x ) = @_;
65 my $miniperl = $target eq 'miniperl';
66 my $perl = $target eq 'perl';
67 my $mmp = "$target.mmp";
68 my $targetpath = $miniperl
69 || $perl ? "TARGETPATH\t\\System\\Apps\\Perl" : "";
70 if ( open( my $fh, ">$mmp" ) ) {
78 if ($SDK_VARIANT eq 'S60' && $S60SDK =~ /^5\./) {
79 print $fh "UID\t0 0xEA3E9181\n" if $miniperl;
80 print $fh "UID\t0 0xED04DD86\n" if $perl;
81 print $fh "UID\t0x1000008d 0xE8667302\n" unless $miniperl || $perl;
82 print $fh "CAPABILITY\tNONE\n";
85 print $fh "EPOCHEAPSIZE\t1024 8388608";
86 print $fh "EPOCSTACKSIZE\t65536";
92 if ($SDK_VARIANT eq 'S60') {
93 print $fh "MACRO\t__SERIES60__\n";
94 print $fh "MACRO\t__SERIES60_1X__\n" if $S60SDK =~ /^1\./;
95 print $fh "MACRO\t__SERIES60_2X__\n" if $S60SDK =~ /^2\./;
96 print $fh "MACRO\t__SERIES60_3X__\n" if $S60SDK =~ /^5\./;
98 if ($SDK_VARIANT eq 'S80') {
99 print $fh "MACRO\t__SERIES80__\n";
100 print $fh "MACRO\t__SERIES80_1X__\n" if $S80SDK =~ /^1\./;
101 print $fh "MACRO\t__SERIES80_2X__\n" if $S80SDK =~ /^2\./;
103 if ($SDK_VARIANT eq 'S90') {
104 print $fh "MACRO\t__SERIES90__\n";
106 if ($SDK_VARIANT eq 'UIQ') {
107 print $fh "MACRO\t__UIQ__\n";
108 print $fh "MACRO\t__UIQ_1X__\n" if $UIQSDK =~ /^1\./;
109 print $fh "MACRO\t__UIQ_2X__\n" if $UIQSDK =~ /^2\./;
112 @c = map { glob } qw(*.c); # Find the .c files.
113 @c = map { lc } @c; # Lowercase the names.
114 @c = grep { !/malloc\.c/ } @c; # Use the system malloc.
115 @c = grep { !/madly\.c/ } @c; # mad is undef.
116 @c = grep { !/main\.c/ } @c; # main.c must be explicit.
117 push @c, map { lc } @x;
118 @c = map { s:^\.\./::; $_ } @c; # Remove the leading ../
119 @c = map { $c{$_}++ } @c; # Uniquefy.
120 @c = sort keys %c; # Beautify.
123 print $fh "SOURCE\t\t$_\n";
128 USERINCLUDE $CWD\\ext\\DynaLoader
129 USERINCLUDE $CWD\\symbian
130 SYSTEMINCLUDE \\epoc32\\include\\libc
131 SYSTEMINCLUDE \\epoc32\\include
138 if ( $miniperl || $perl || $type eq 'dll' ) {
145 if ($SDK_VARIANT =~ /^S[689]0$/) {
147 LIBRARY commonengine.lib
150 if (defined $S60SDK) {
153 LIBRARY commondialogs.lib
156 if ((defined $S80SDK) or (defined $S90SDK)) {
164 if (defined $UIQSDK) {
172 if ( $type eq 'exe' ) {
174 STATICLIBRARY ecrt0.lib
190 MACRO PERL_IMPLICIT_CONTEXT
192 unless ( $miniperl || $perl ) {
194 MACRO PERL_GLOBAL_STRUCT
195 MACRO PERL_GLOBAL_STRUCT_PRIVATE
198 unless ($miniperl || $perl ) {
199 if ($SDK_VARIANT eq 'S60' && $S60SDK =~ /^5\./) {
200 print $fh "START RESOURCE\tsymbian\\PerlUi.rss\nEND\n";
202 print $fh "RESOURCE\tsymbian\\PerlUi.rss";
208 warn "$0: failed to open $mmp for writing: $!\n";
213 if ( open( BLD_INF, ">bld.inf" ) ) {
215 push @unclean, "bld.inf";
216 print BLD_INF <<__EOF__;
221 for (@mmp) { print BLD_INF $_, "\n" }
225 warn "$0: failed to open bld.inf for writing: $!\n";
232 if ( open( CONFIG_SH, "symbian/config.sh" ) ) {
233 while (<CONFIG_SH>) {
234 if (/^(\w+)=['"]?(.*?)["']?$/) {
235 my ( $var, $val ) = ( $1, $2 );
236 $val =~ s/x.y.z/$R_V_SV/gi;
237 $val =~ s/thumb/$ARM/gi;
238 $val = "C:$val" if (defined($S90SDK) and ($val =~ /^(\/|\\\\)system[\/\\]/i));
239 $val = "'$SYMBIAN_VERSION'" if $var eq 'osvers';
240 $val = "'$SDK_VERSION'" if $var eq 'sdkvers';
241 $config{$var} = $val;
247 warn "$0: failed to open symbian\\config.sh for reading: $!\n";
251 sub create_config_h {
253 if ( open( CONFIG_H, ">config.h" ) ) {
254 print "\tconfig.h\n";
255 push @unclean, "config.h";
256 if ( open( CONFIG_H_SH, "config_h.SH" ) ) {
257 while (<CONFIG_H_SH>) {
258 last if /\#ifndef _config_h_/;
260 print CONFIG_H <<__EOF__;
262 * Package name : perl
263 * Source directory : .
264 * Configuration time:
266 * Target system : symbian
271 while (<CONFIG_H_SH>) {
272 last if /!GROK!THIS/;
273 s/\$(\w+)/exists $config{$1} ? $config{$1} : (warn "$0: config.sh missing '$1'\n", "")/eg;
274 s/^#undef\s+(\S+).+/#undef $1/g;
281 warn "$0: failed to open ../config_h.SH for reading: $!\n";
286 warn "$0: failed to open config.h for writing: $!\n";
290 sub create_DynaLoader_cpp {
291 print "\text\\DynaLoader\\DynaLoader.cpp\n";
293 q[xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp]
295 or die "$0: creating DynaLoader.cpp failed: $!\n";
296 push @unclean, 'ext\DynaLoader\DynaLoader.cpp';
300 sub create_symbian_port_h {
301 print "\tsymbian\\symbian_port.h\n";
302 if ( open( SYMBIAN_PORT_H, ">symbian/symbian_port.h" ) ) {
303 my ($sdkmajor, $sdkminor);
304 if ($SDK_VARIANT eq 'S60') {
305 $S60SDK =~ /^(\d+)\.(\d+)$/;
306 ($sdkmajor, $sdkminor) = ($1, $2);
308 if ($SDK_VARIANT eq 'S80') {
309 $S80SDK =~ /^(\d+)\.(\d+)$/;
310 ($sdkmajor, $sdkminor) = ($1, $2);
312 if ($SDK_VARIANT eq 'S90') {
313 $S90SDK =~ /^(\d+)\.(\d+)$/;
314 ($sdkmajor, $sdkminor) = ($1, $2);
316 if ($SDK_VARIANT eq 'UIQ') {
317 $UIQSDK =~ /^(\d+)\.(\d+)$/;
318 ($sdkmajor, $sdkminor) = ($1, $2);
320 print SYMBIAN_PORT_H <<__EOF__;
321 /* Copyright (c) 2004-2005, Nokia. All rights reserved. */
323 #ifndef __symbian_port_h__
324 #define __symbian_port_h__
326 #define PERL_SYMBIANPORT_MAJOR $PORT{dll}->{MAJOR}
327 #define PERL_SYMBIANPORT_MINOR $PORT{dll}->{MINOR}
328 #define PERL_SYMBIANPORT_PATCH $PORT{dll}->{PATCH}
330 #define PERL_SYMBIANSDK_FLAVOR L"$SDK_VARIANT"
331 #define PERL_SYMBIANSDK_MAJOR $sdkmajor
332 #define PERL_SYMBIANSDK_MINOR $sdkminor
334 #endif /* #ifndef __symbian_port_h__ */
336 close(SYMBIAN_PORT_H);
337 push @unclean, 'symbian\symbian_port.h';
340 warn "$0: failed to open symbian/symbian_port.h for writing: $!\n";
344 sub create_perlmain_c {
345 print "\tperlmain.c\n";
347 q[perl -ne "print qq[ char *file = __FILE__;\n] if /dXSUB_SYS/;print unless /PERL_UNUSED_CONTEXT/;print qq[ newXS(\"DynaLoader::boot_DynaLoader\", boot_DynaLoader, file);\n] if /dXSUB_SYS/;print qq[EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);\n] if /Do not delete this line/" miniperlmain.c > perlmain.c]
349 or die "$0: Creating perlmain.c failed: $!\n";
350 push @unclean, 'perlmain.c';
353 sub create_PerlApp_pkg {
354 print "\tsymbian\\PerlApp.pkg\n";
355 if ( open( PERLAPP_PKG, ">symbian\\PerlApp.pkg" ) ) {
358 qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] :
360 qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] :
362 qq[;Supports Series 90 v1.1\n(0x101FBE05), 0, 0, 0, {"Series90ProductID"}\n] :
363 defined $UIQSDK && $SDK_VERSION =~ /^(\d)\.(\d)$/ ?
364 qq[;Supports UIQ v2.1\n(0x101F617B), $1, $2, 0, {"UIQ21ProductID"}\n] :
365 ";Supports Series NN";
367 if (($SDK_VARIANT eq 'S60' && $SDK_VERSION ne '1.2' || $WIN eq 'winscw') || defined $S80SDK || defined $S90SDK) { # Do only if not in S60 1.2 VC.
368 $APPS =~ s!\\epoc32\\release\\(.+)\\$UARM$!\\epoc32\\data\\z\\system\\apps\\PerlApp!i;
370 # TODO: in S60 3.0 there will be no more recognizers.
371 my $mdl = qq["$UREL\\PerlRecog.mdl"-"!:\\system\\recogs\\PerlRecog.mdl";];
372 my $AIF = $SDK_VARIANT =~ /^S[689]0/ ? qq["$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"] : "";
373 print PERLAPP_PKG <<__EOF__;
374 ; !!!!!! DO NOT EDIT THIS FILE !!!!!!
375 ; This file is built by symbian\\config.pl.
376 ; Any changes made here will be lost!
380 ; Note that the demo_pl needs to be run to create the demo .pl scripts.
385 ; Standard SIS file header
386 #{"PerlApp"},(0x102015F6),0,2,0
391 "$UREL\\PerlApp.APP"-"!:\\system\\apps\\PerlApp\\PerlApp.app"
393 "$APPS\\PerlApp.rsc"-"!:\\system\\apps\\PerlApp\\PerlApp.rsc"
396 if ( open( DEMOS, "perl symbian\\demo_pl list |" ) ) {
399 if (defined $S90SDK) {
400 print PERLAPP_PKG qq["$_"-"!:\\Mydocs\\Perl\\$_"\n];
402 print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n];
410 die "$0: symbian\\PerlApp.pkg: $!\n";
412 push @unclean, 'symbian\PerlApp.pkg';
415 print "Creating...\n";
418 'miniperlmain.c', 'symbian\symbian_stubs.c',
419 'symbian\PerlBase.cpp',
420 'symbian\PerlUi.cpp',
421 'symbian\PerlUtil.cpp',
422 'symbian\symbian_utils.cpp',
426 'perlmain.c', 'symbian\symbian_stubs.c',
427 'symbian\symbian_utils.cpp',
428 'symbian\PerlBase.cpp',
429 'symbian\PerlUi.cpp',
430 'symbian\PerlUtil.cpp',
431 'ext\DynaLoader\DynaLoader.cpp',
435 "perl$VERSION", 'dll',
436 'symbian\symbian_dll.cpp', 'symbian\symbian_stubs.c',
437 'symbian\symbian_utils.cpp',
438 'symbian\PerlBase.cpp',
439 'symbian\PerlUi.cpp',
440 'symbian\PerlUtil.cpp',
441 'ext\DynaLoader\DynaLoader.cpp',
447 create_symbian_port_h();
448 create_DynaLoader_cpp();
449 create_PerlApp_pkg();
451 if ( open( PERLAPP_MMP, ">symbian/PerlApp.mmp" ) ) {
454 push @MACRO, 'PERL_IMPLICIT_CONTEXT';
455 push @MACRO, 'MULTIPLICITY';
456 if (defined $S60SDK) {
457 push @MACRO, '__SERIES60__';
458 push @MACRO, '__SERIES60_1X__' if $S60SDK =~ /^1\./;
459 push @MACRO, '__SERIES60_2X__' if $S60SDK =~ /^2\./;
460 push @LIB, <<__EOF__;
462 LIBRARY commondialogs.lib
465 if (defined $S80SDK) {
466 push @MACRO, '__SERIES80__';
467 push @MACRO, '__SERIES80_1X__' if $S80SDK =~ /^1\./;
468 push @MACRO, '__SERIES80_2X__' if $S80SDK =~ /^2\./;
469 push @LIB, <<__EOF__;
476 if (defined $S90SDK) {
477 push @MACRO, '__SERIES90__';
478 push @LIB, <<__EOF__;
485 if (defined $UIQSDK) {
486 push @MACRO, '__UIQ__';
487 push @MACRO, '__UIQ_1X__' if $UIQSDK =~ /^1\./;
488 push @MACRO, '__UIQ_2X__' if $UIQSDK =~ /^2\./;
489 push @LIB, <<__EOF__;
496 print PERLAPP_MMP <<__EOF__;
497 // !!!!!! DO NOT EDIT THIS FILE !!!!!!
498 // This file is built by symbian\\config.pl.
499 // Any changes made here will be lost!
502 UID 0x100039CE 0x102015F6
503 TARGETPATH \\system\\apps\\PerlApp
511 USERINCLUDE \\symbian\\perl\\$R_V_SV\\include
513 SYSTEMINCLUDE \\epoc32\\include
514 SYSTEMINCLUDE \\epoc32\\include\\libc
524 LIBRARY perl$VERSION.lib
529 for my $macro (@MACRO) {
530 print PERLAPP_MMP <<__EOF__;
535 if ($SDK_VARIANT =~ /^S[689]0$/) {
536 print PERLAPP_MMP <<__EOF__;
537 AIF PerlApp.aif . PerlAppAif.rss
541 push @unclean, 'symbian\PerlApp.mmp';
544 warn "$0: failed to create symbian\\PerlApp.mmp";
547 if ( open( MAKEFILE, ">Makefile" ) ) {
548 my $perl = "perl$VERSION";
549 my $windef1 = "$SYMBIAN_ROOT\\Epoc32\\Build$CWD\\$perl\\$WIN\\$perl.def";
550 my $windef2 = "..\\BWINS\\${perl}u.def";
551 my $armdef1 = "$SYMBIAN_ROOT\\Epoc32\\Build$CWD\\$perl\\$ARM\\$perl.def";
552 my $armdef2 = "..\\BMARM\\${perl}u.def";
553 my $MF = $WIN eq 'wins' ? 'vc6' : $WIN eq 'winscw' ? 'cw_ide' : "UNKNOWN";
554 print "\tMakefile\n";
555 print MAKEFILE <<__EOF__;
557 \@echo === Perl for Symbian ===
558 \@echo Useful targets:
559 \@echo all win arm clean
560 \@echo perldll.sis perlext.sis perlsdk.zip
567 build: rename_makedef build_${WIN} build_arm
569 @unclean: symbian\\config.pl
570 perl symbian\\config.pl
572 build_${WIN}: abld.bat perldll_${WIN}
574 build_vc6: abld.bat perldll_wins
576 build_vc7: abld.bat perldll_wins
578 build_cw: abld.bat perldll_winscw
580 build_arm: abld.bat perl_arm miniperl_arm perldll_arm
582 miniperl_win miniperl_${WIN}: miniperl.mmp abld.bat rename_makedef
583 abld build ${WIN} udeb miniperl
585 miniperl_arm: miniperl.mmp abld.bat rename_makedef
586 abld build \$(ARM) $UARM miniperl
588 miniperl: miniperl_${WIN} miniperl_arm
590 perl: perl_${WIN} perl_arm
592 perl_win perl_${WIN}: perl.mmp abld.bat rename_makedef
593 abld build ${WIN} perl
595 perl_arm: perl.mmp abld.bat rename_makedef
596 abld build \$(ARM) $UARM perl
598 perldll_win perldll_${WIN}: perl${VERSION}_${WIN} freeze_${WIN} perl${VERSION}_${WIN}
600 perl${VERSION}_win perl${VERSION}_${WIN}: perl$VERSION.mmp abld.bat rename_makedef
601 abld build ${WIN} perl$VERSION
603 perldll_arm: perl${VERSION}_arm freeze_arm perl${VERSION}_arm
605 perl${VERSION}_arm: perl$VERSION.mmp abld.bat rename_makedef
606 abld build \$(ARM) $UARM perl$VERSION
608 perldll perl$VERSION: perldll_${WIN} perldll_arm
610 win ${WIN}: miniperl_${WIN} perl_${WIN} perldll_${WIN}
612 thumb arm: miniperl_arm perl_arm perldll_arm
615 -ren makedef.pl nomakedef.pl
617 # Symbian SDK has a makedef.pl of its own,
618 # and we don't need Perl's.
620 -ren nomakedef.pl makedef.pl
622 symbian\\PerlUi.rss: symbian\\PerlUi$SDK_VARIANT.rss
623 copy symbian\\PerlUi$SDK_VARIANT.rss symbian\\PerlUi.rss
625 abld.bat abld: bld.inf symbian\\PerlUi.rss
628 vc6: win.mf vc6.mf build_vc6
630 vc7: win.mf vc7.mf build_vc7
632 cw: win.mf cw.mf build_cw
634 ${WIN}_miniperl.mf: abld.bat symbian\\config.pl
635 abld makefile ${MF} miniperl
636 echo > ${WIN}_miniperl.mf
638 ${WIN}_perl.mf: abld.bat symbian\\config.pl
639 abld makefile ${MF} perl
640 echo > ${WIN}_perl.mf
642 ${WIN}_${VERSION}.mf: abld.bat symbian\\config.pl
643 abld makefile ${MF} perl${VERSION}
644 echo > ${WIN}_${VERSION}.mf
647 cd symbian; make ${WIN}.mf
649 ${WIN}.mf: ${WIN}_miniperl.mf ${WIN}_perl.mf ${WIN}_${VERSION}.mf symbian\\${WIN}.mf
651 arm_miniperl.mf: abld.bat symbian\\config.pl
652 echo > arm_miniperl.mf
654 arm_perl.mf: abld.bat symbian\\config.pl
657 arm_${VERSION}.mf: abld.bat symbian\\config.pl
658 echo > arm_${VERSION}.mf
660 arm.mf: arm_miniperl.mf arm_perl.mf arm_${VERSION}.mf
665 vc6.mf: abld.bat symbian\\config.pl
669 vc7.mf: abld.bat symbian\\config.pl
673 cw.mf: abld.bat symbian\\config.pl
677 PM = lib\\Config.pm lib\\Cross.pm lib\\lib.pm ext\\DynaLoader\\DynaLoader.pm ext\\DynaLoader\\XSLoader.pm ext\\Errno\\Errno.pm
678 POD = lib\\Config.pod
682 XLIB = -Ixlib\\symbian
684 XSBOPT = --win=\$(WIN) --arm=\$(ARM)
687 copy symbian\\config.sh config.sh
689 if (defined $S90SDK) {
690 print MAKEFILE <<__EOF__;
691 perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g; s!='(\\\\\\\\system)!='C:\\1!" config.sh
694 print MAKEFILE <<__EOF__;
695 perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g" config.sh
698 print MAKEFILE <<__EOF__;
699 perl \$(XLIB) configpm --cross=symbian
700 copy xlib\\symbian\\Config.pm lib\\Config.pm
701 perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" lib\\Config.pm
702 perl -pi.bak -e "s:5\\.\\d+\\.\\d+:$R_V_SV:g" lib\\Config.pm
703 -perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" xlib\\symbian\\Config_heavy.pl
708 ext\\DynaLoader\\DynaLoader.pm:
709 -del /f ext\\DynaLoader\\DynaLoader.pm
710 perl -Ixlib\\symbian ext\\DynaLoader\\DynaLoader_pm.PL
711 perl -pi.bak -e "s/__END__//" DynaLoader.pm
712 copy /y DynaLoader.pm ext\\DynaLoader\\DynaLoader.pm
713 -del /f DynaLoader.pm DynaLoader.pm.bak
715 ext\\DynaLoader\\XSLoader.pm:
716 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) XSLoader
718 ext\\Errno\\Errno.pm:
719 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) Errno
721 miniperlexe.sis: miniperl_arm symbian\\makesis.pl
722 perl \$(XLIB) symbian\\makesis.pl miniperl
724 perlexe.sis: perl_arm symbian\\makesis.pl
725 perl \$(XLIB) symbian\\makesis.pl perl
728 allsis: all miniperlexe.sis perlexe.sis perldll.sis perllib.sis perlext.sis perlapp.sis
730 perldll.sis perl$VERSION.sis: perldll_arm pm symbian\\makesis.pl
731 perl \$(XLIB) symbian\\makesis.pl perl${VERSION}dll
733 perl${VERSION}lib.sis perllib.sis: \$(PM)
734 perl \$(XLIB) symbian\\makesis.pl perl${VERSION}lib
736 perl${VERSION}ext.sis perlext.sis: perldll_arm buildext_sis
737 perl symbian\\makesis.pl perl${VERSION}ext
739 EXT = Compress::Raw::Zlib Cwd Data::Dumper Devel::Peek Digest::MD5 Errno Fcntl File::Glob Filter::Util::Call IO List::Util MIME::Base64 PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes XSLoader attributes
741 buildext: perldll symbian\\xsbuild.pl lib\\Config.pm
742 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) \$(EXT)
744 buildextcpp: perldll symbian\\xsbuild.pl lib\\Config.pm
745 perl \$(XLIB) symbian\\xsbuild.pl --csuffix .cpp \$(XSBOPT) \$(EXT)
747 buildext_sis: perldll.sis symbian\\xsbuild.pl lib\\Config.pm
748 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --sis \$(EXT)
750 buildextcpp_sis: perldll.sis symbian\\xsbuild.pl lib\\Config.pm
751 perl \$(XLIB) symbian\\xsbuild.pl --csuffix .cpp \$(XSBOPT) --sis \$(EXT)
753 cleanext: symbian\\xsbuild.pl
754 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT)
756 distcleanext: symbian\\xsbuild.pl
757 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --distclean \$(EXT)
759 sis makesis: miniperl perl perldll pm buildext perlapp.sis
760 perl \$(XLIB) symbian\\makesis.pl
762 APIDIR = \\Symbian\\perl\\$R_V_SV
765 -mkdir \\Symbian\\perl
766 -mkdir \\Symbian\\perl\\$R_V_SV
767 -mkdir \$(APIDIR)\\include
768 -mkdir \$(APIDIR)\\include\\symbian
769 -mkdir \$(APIDIR)\\lib
770 -mkdir \$(APIDIR)\\lib\\ExtUtils
771 -mkdir \$(APIDIR)\\pod
772 -mkdir \$(APIDIR)\\bin
774 copy /y *.h \$(APIDIR)\\include
775 -copy /y *.inc \$(APIDIR)\\include
776 copy /y lib\\ExtUtils\\xsubpp \$(APIDIR)\\lib\\ExtUtils
777 copy /y lib\\ExtUtils\\typemap \$(APIDIR)\\lib\\ExtUtils
778 copy /y lib\\ExtUtils\\ParseXS.pm \$(APIDIR)\\lib\\ExtUtils
779 copy /y symbian\\xsbuild.pl \$(APIDIR)\\bin
780 copy /y symbian\\sisify.pl \$(APIDIR)\\bin
781 copy /y symbian\\PerlBase.h \$(APIDIR)\\include
782 copy /y symbian\\PerlUi.h \$(APIDIR)\\include
783 copy /y symbian\\PerlUtil.h \$(APIDIR)\\include
784 copy /y symbian\\symbian*.h \$(APIDIR)\\include\\symbian
785 copy /y symbian\\PerlBase.pod \$(APIDIR)\\pod
786 copy /y symbian\\PerlUtil.pod \$(APIDIR)\\pod
788 RELDIR = $SYMBIAN_ROOT\\epoc32\\release
789 RELWIN = \$(RELDIR)\\\$(WIN)\\udeb
790 RELARM = \$(RELDIR)\\\$(ARM)\\$UARM
791 SDKZIP = perl${VERSION}sdk.zip
794 \$(SDKZIP) perlsdk.zip: perldll sdkinstall
795 -del /f perl${VERSION}sdk.zip
796 zip -r perl${VERSION}sdk.zip \$(RELWIN)\\perl$VERSION.* \$(RELARM)\\perl$VERSION.* \$(APIDIR)
797 \@echo perl${VERSION}sdk.zip created.
799 PERLSIS = perl${VERSION}.SIS perl${VERSION}lib.SIS perl${VERSION}ext.SIS
800 ALLSIS = \$(PERLSIS) perlapp.sis
801 ETC = README.symbian symbian\\PerlBase.pod symbian\\PerlUtil.pod symbian\\sisify.pl symbian\\TODO
803 perl${VERSION}dist.zip perldist.zip: \$(ALLSIS) \$(SDKZIP) \$(ETC)
804 -del /f perl${VERSION}dist.zip
805 zip -r perl${VERSION}dist.zip \$(ALLSIS) \$(SDKZIP) \$(ETC)
807 perlapp: sdkinstall perlapp_${WIN} perlapp_arm
809 perlapp_arm_minimal sisify_hex perlappmin.hex perlrscmin.hex: sdkinstall config.h
810 cd symbian; make perlapp_arm USERDEFS=-DCreatePerlAppMinimal
811 perl symbian\\hexdump.pl
813 perlapp_win perlapp_${WIN}: config.h
814 cd symbian; make perlapp_${WIN}
816 perlapp_arm: config.h
817 cd symbian; make perlapp_arm
820 cd symbian; make clean
822 perlapp_demo_extract:
823 cd symbian; make perlapp_demo_extract
825 perlapp.sis: perlapp_arm
826 cd symbian; make perlapp.sis
829 cd symbian; zip perlapp.zip PerlApp.* PerlRecog.* PerlBase.* PerlUtil.* demo_pl
831 zip: perlsdk.zip perlapp.zip
833 freeze: freeze_${WIN} freeze_arm
836 abld freeze ${WIN} perl$VERSION
839 abld freeze \$(ARM) perl$VERSION
841 defrost: defrost_${WIN} defrost_arm
851 clean_${WIN}: abld.bat
857 clean: clean_${WIN} clean_arm rerename_makedef
860 -del /f lib\\Config.pm.bak
861 -del /f xlib\\symbian\\Config_heavy.pl
864 -del /f DynaLoader.pm ext\\DynaLoader\\DynaLoader.pm
865 -del /f ext\\DynaLoader\\Makefile
866 -del /f ext\\SDBM_File\\sdbm\\Makefile
867 -del /f symbian\\*.lst
868 -del /f abld.bat @unclean *.pkg *.sis *.zip
869 -del /f symbian\\abld.bat symbian\\*.sis symbian\\*.zip
870 -del /f symbian\\perl5*.pkg symbian\\miniperl.pkg
871 -del arm_*.mf ${WIN}_*.mf vc*.mf cw*.mf
872 -del symbian\\Makefile
873 -del symbian\\PerlUi.rss symbian\\PerlApp.rss
874 -del perlappmin.hex perlrscmin.hex
875 -perl symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT)
876 -rmdir /s /q perl${VERSION}_Data
877 -cd symbian; make clean
879 reallyclean: abld.bat
882 distclean: defrost reallyclean clean
883 -perl symbian\\xsbuild.pl \$(XSBOPT) --distclean \$(EXT)
884 -del /f config.h config.sh.bak symbian\\symbian_port.h
885 -del /f Makefile symbian\\PerlApp.mmp
887 -del /f *.cwlink *.resources *.pref
888 -del /f perl${VERSION}.xml perl${VERSION}.mcp uid.cpp
890 cd symbian; make distclean
891 -del /f symbian\\Makefile
896 warn "$0: failed to create Makefile: $!\n";
899 if ( open( MAKEFILE, ">symbian/Makefile")) {
900 my $wrap = defined $S60SDK && $S60SDK eq '1.2' && $WIN ne '${WIN}cw';
901 my $ABLD = $wrap ? 'perl b.pl': 'abld';
902 print "\tsymbian/Makefile\n";
903 my $MF = $WIN eq 'wins' ? 'vc6' : $WIN eq 'winscw' ? 'cw_ide' : "UNKNOWN";
904 print MAKEFILE <<__EOF__;
913 perlapp_${WIN}: abld.bat ..\\config.h PerlApp.h PerlApp.cpp
914 copy PerlUi$SDK_VARIANT.rss PerlApp.rss
916 \$(ABLD) build ${WIN} udeb
918 perlapp_arm: ..\\config.h PerlApp.h PerlApp.cpp
919 copy PerlUi$SDK_VARIANT.rss PerlApp.rss
921 \$(ABLD) build ${ARM} $UARM
930 perlapp_demo_extract:
933 perlapp.sis: perlapp_arm perlapp_demo_extract
936 copy /y perlapp.SIS ..\\perlapp.SIS
939 -perl demo_pl cleanup
948 -del /f *.cwlink *.resources *.pref
949 -del /f PerlApp.xml PerlApp.mcp uid.cpp
950 -rmdir /s /q PerlApp_Data
955 if ( open( B_PL, ">symbian/b.pl")) {
956 print B_PL <<'__EOF__';
959 # nmake doesn't like MFLAGS and MAKEFLAGS being set to -w and w.
961 delete $ENV{MAKEFLAGS};
963 system("abld @ARGV");
967 warn "$0: failed to create symbian/b.pl: $!\n";
971 warn "$0: failed to create symbian/Makefile: $!\n";
974 print "Deleting...\n";
976 # Do not delete config.h here.
979 "xlib\\symbian\\Config.pm",
980 "xlib\\symbian\\Config_heavy.pl",
981 "symbian\\PerlUi.rss",
982 "symbian\\PerlApp.rss",