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";
14 my %VERSION = %{ do "version.pl" };
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) =
24 my %PORT = %{ do "port.pl" };
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 my $S80SDK = $ENV{S80SDK}; # qw(2.0) (from sdk.pl)
34 my $S90SDK = $ENV{S90SDK}; # qw(1.1) (from sdk.pl)
35 my $UIQSDK = $ENV{UIQSDK}; # qw(2.0 2.1) (from sdk.pl)
37 my $UREL = $ENV{UREL}; # from sdk.pl
38 $UREL =~ s/-ARM-/$ARM/;
39 my $UARM = $ENV{UARM}; # from sdk.pl
41 die "$0: SDK not recognized\n"
42 if !defined($SYMBIAN_VERSION) ||
43 !defined($SDK_VERSION) ||
44 (!defined($S60SDK) && !defined($S80SDK) && !defined($S90SDK) && !defined($UIQSDK));
46 die "$0: does not know which Windows compiler to use\n"
49 print "Symbian $SYMBIAN_VERSION SDK $SDK_VARIANT $SDK_VERSION ($WIN) installed at $SYMBIAN_ROOT\n";
51 my $CWD = do "cwd.pl";
52 print "Build directory $CWD\n";
54 die "$0: '+' in cwd does not work with Series 60 SDK 1.2\n"
55 if defined $S60SDK && $S60SDK eq '1.2' && $CWD =~ /\+/;
61 my ( $target, $type, @x ) = @_;
62 my $miniperl = $target eq 'miniperl';
63 my $perl = $target eq 'perl';
64 my $mmp = "$target.mmp";
65 my $targetpath = $miniperl
66 || $perl ? "TARGETPATH\t\\System\\Apps\\Perl" : "";
67 if ( open( my $fh, ">$mmp" ) ) {
75 EPOCHEAPSIZE 1024 8388608
80 if ($SDK_VARIANT eq 'S60') {
81 print $fh "MACRO\t__SERIES60__\n";
82 print $fh "MACRO\t__SERIES60_1X__\n" if $S60SDK =~ /^1\./;
83 print $fh "MACRO\t__SERIES60_2X__\n" if $S60SDK =~ /^2\./;
85 if ($SDK_VARIANT eq 'S80') {
86 print $fh "MACRO\t__SERIES80__\n";
87 print $fh "MACRO\t__SERIES80_1X__\n" if $S80SDK =~ /^1\./;
88 print $fh "MACRO\t__SERIES80_2X__\n" if $S80SDK =~ /^2\./;
90 if ($SDK_VARIANT eq 'S90') {
91 print $fh "MACRO\t__SERIES90__\n";
93 if ($SDK_VARIANT eq 'UIQ') {
94 print $fh "MACRO\t__UIQ__\n";
95 print $fh "MACRO\t__UIQ_1X__\n" if $UIQSDK =~ /^1\./;
96 print $fh "MACRO\t__UIQ_2X__\n" if $UIQSDK =~ /^2\./;
99 @c = map { glob } qw(*.c); # Find the .c files.
100 @c = map { lc } @c; # Lowercase the names.
101 @c = grep { !/malloc\.c/ } @c; # Use the system malloc.
102 @c = grep { !/madly\.c/ } @c; # mad is undef.
103 @c = grep { !/main\.c/ } @c; # main.c must be explicit.
104 push @c, map { lc } @x;
105 @c = map { s:^\.\./::; $_ } @c; # Remove the leading ../
106 @c = map { $c{$_}++ } @c; # Uniquefy.
107 @c = sort keys %c; # Beautify.
110 print $fh "SOURCE\t\t$_\n";
115 USERINCLUDE $CWD\\ext\\DynaLoader
116 USERINCLUDE $CWD\\symbian
117 SYSTEMINCLUDE \\epoc32\\include\\libc
118 SYSTEMINCLUDE \\epoc32\\include
125 if ( $miniperl || $perl || $type eq 'dll' ) {
132 if ($SDK_VARIANT =~ /^S[689]0$/) {
134 LIBRARY commonengine.lib
137 if (defined $S60SDK) {
140 LIBRARY commondialogs.lib
143 if ((defined $S80SDK) or (defined $S90SDK)) {
151 if (defined $UIQSDK) {
159 if ( $type eq 'exe' ) {
161 STATICLIBRARY ecrt0.lib
177 MACRO PERL_IMPLICIT_CONTEXT
179 unless ( $miniperl || $perl ) {
181 MACRO PERL_GLOBAL_STRUCT
182 MACRO PERL_GLOBAL_STRUCT_PRIVATE
183 RESOURCE symbian\\PerlUi.rss
189 warn "$0: failed to open $mmp for writing: $!\n";
194 if ( open( BLD_INF, ">bld.inf" ) ) {
196 push @unclean, "bld.inf";
197 print BLD_INF <<__EOF__;
202 for (@mmp) { print BLD_INF $_, "\n" }
206 warn "$0: failed to open bld.inf for writing: $!\n";
213 if ( open( CONFIG_SH, "symbian/config.sh" ) ) {
214 while (<CONFIG_SH>) {
215 if (/^(\w+)=['"]?(.*?)["']?$/) {
216 my ( $var, $val ) = ( $1, $2 );
217 $val =~ s/x.y.z/$R_V_SV/gi;
218 $val =~ s/thumb/$ARM/gi;
219 $val = "C:$val" if (defined($S90SDK) and ($val =~ /^(\/|\\\\)system[\/\\]/i));
220 $val = "'$SYMBIAN_VERSION'" if $var eq 'osvers';
221 $val = "'$SDK_VERSION'" if $var eq 'sdkvers';
222 $config{$var} = $val;
228 warn "$0: failed to open symbian\\config.sh for reading: $!\n";
232 sub create_config_h {
234 if ( open( CONFIG_H, ">config.h" ) ) {
235 print "\tconfig.h\n";
236 push @unclean, "config.h";
237 if ( open( CONFIG_H_SH, "config_h.SH" ) ) {
238 while (<CONFIG_H_SH>) {
239 last if /\#ifndef _config_h_/;
241 print CONFIG_H <<__EOF__;
243 * Package name : perl
244 * Source directory : .
245 * Configuration time:
247 * Target system : symbian
252 while (<CONFIG_H_SH>) {
253 last if /!GROK!THIS/;
254 s/\$(\w+)/exists $config{$1} ? $config{$1} : (warn "$0: config.sh missing '$1'\n", "")/eg;
255 s/^#undef\s+(\S+).+/#undef $1/g;
262 warn "$0: failed to open ../config_h.SH for reading: $!\n";
267 warn "$0: failed to open config.h for writing: $!\n";
271 sub create_DynaLoader_cpp {
272 print "\text\\DynaLoader\\DynaLoader.cpp\n";
274 q[xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp]
276 or die "$0: creating DynaLoader.cpp failed: $!\n";
277 push @unclean, 'ext\DynaLoader\DynaLoader.cpp';
281 sub create_symbian_port_h {
282 print "\tsymbian\\symbian_port.h\n";
283 if ( open( SYMBIAN_PORT_H, ">symbian/symbian_port.h" ) ) {
284 my ($sdkmajor, $sdkminor);
285 if ($SDK_VARIANT eq 'S60') {
286 $S60SDK =~ /^(\d+)\.(\d+)$/;
287 ($sdkmajor, $sdkminor) = ($1, $2);
289 if ($SDK_VARIANT eq 'S80') {
290 $S80SDK =~ /^(\d+)\.(\d+)$/;
291 ($sdkmajor, $sdkminor) = ($1, $2);
293 if ($SDK_VARIANT eq 'S90') {
294 $S90SDK =~ /^(\d+)\.(\d+)$/;
295 ($sdkmajor, $sdkminor) = ($1, $2);
297 if ($SDK_VARIANT eq 'UIQ') {
298 $UIQSDK =~ /^(\d+)\.(\d+)$/;
299 ($sdkmajor, $sdkminor) = ($1, $2);
301 print SYMBIAN_PORT_H <<__EOF__;
302 /* Copyright (c) 2004-2005, Nokia. All rights reserved. */
304 #ifndef __symbian_port_h__
305 #define __symbian_port_h__
307 #define PERL_SYMBIANPORT_MAJOR $PORT{dll}->{MAJOR}
308 #define PERL_SYMBIANPORT_MINOR $PORT{dll}->{MINOR}
309 #define PERL_SYMBIANPORT_PATCH $PORT{dll}->{PATCH}
311 #define PERL_SYMBIANSDK_FLAVOR L"$SDK_VARIANT"
312 #define PERL_SYMBIANSDK_MAJOR $sdkmajor
313 #define PERL_SYMBIANSDK_MINOR $sdkminor
315 #endif /* #ifndef __symbian_port_h__ */
317 close(SYMBIAN_PORT_H);
318 push @unclean, 'symbian\symbian_port.h';
321 warn "$0: failed to open symbian/symbian_port.h for writing: $!\n";
325 sub create_perlmain_c {
326 print "\tperlmain.c\n";
328 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]
330 or die "$0: Creating perlmain.c failed: $!\n";
331 push @unclean, 'perlmain.c';
334 sub create_PerlApp_pkg {
335 print "\tsymbian\\PerlApp.pkg\n";
336 if ( open( PERLAPP_PKG, ">symbian\\PerlApp.pkg" ) ) {
339 qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] :
341 qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] :
343 qq[;Supports Series 90 v1.1\n(0x101FBE05), 0, 0, 0, {"Series90ProductID"}\n] :
344 defined $UIQSDK && $SDK_VERSION =~ /^(\d)\.(\d)$/ ?
345 qq[;Supports UIQ v2.1\n(0x101F617B), $1, $2, 0, {"UIQ21ProductID"}\n] :
346 ";Supports Series NN";
348 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.
349 $APPS =~ s!\\epoc32\\release\\(.+)\\$UARM$!\\epoc32\\data\\z\\system\\apps\\PerlApp!i;
351 # TODO: in S60 3.0 there will be no more recognizers.
352 my $mdl = qq["$UREL\\PerlRecog.mdl"-"!:\\system\\recogs\\PerlRecog.mdl";];
353 my $AIF = $SDK_VARIANT =~ /^S[689]0/ ? qq["$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"] : "";
354 print PERLAPP_PKG <<__EOF__;
355 ; !!!!!! DO NOT EDIT THIS FILE !!!!!!
356 ; This file is built by symbian\\config.pl.
357 ; Any changes made here will be lost!
361 ; Note that the demo_pl needs to be run to create the demo .pl scripts.
366 ; Standard SIS file header
367 #{"PerlApp"},(0x102015F6),0,2,0
372 "$UREL\\PerlApp.APP"-"!:\\system\\apps\\PerlApp\\PerlApp.app"
374 "$APPS\\PerlApp.rsc"-"!:\\system\\apps\\PerlApp\\PerlApp.rsc"
377 if ( open( DEMOS, "perl symbian\\demo_pl list |" ) ) {
380 if (defined $S90SDK) {
381 print PERLAPP_PKG qq["$_"-"!:\\Mydocs\\Perl\\$_"\n];
383 print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n];
391 die "$0: symbian\\PerlApp.pkg: $!\n";
393 push @unclean, 'symbian\PerlApp.pkg';
396 print "Creating...\n";
399 'miniperlmain.c', 'symbian\symbian_stubs.c',
400 'symbian\PerlBase.cpp',
401 'symbian\PerlUi.cpp',
402 'symbian\PerlUtil.cpp',
403 'symbian\symbian_utils.cpp',
407 'perlmain.c', 'symbian\symbian_stubs.c',
408 'symbian\symbian_utils.cpp',
409 'symbian\PerlBase.cpp',
410 'symbian\PerlUi.cpp',
411 'symbian\PerlUtil.cpp',
412 'ext\DynaLoader\DynaLoader.cpp',
416 "perl$VERSION", 'dll',
417 'symbian\symbian_dll.cpp', 'symbian\symbian_stubs.c',
418 'symbian\symbian_utils.cpp',
419 'symbian\PerlBase.cpp',
420 'symbian\PerlUi.cpp',
421 'symbian\PerlUtil.cpp',
422 'ext\DynaLoader\DynaLoader.cpp',
428 create_symbian_port_h();
429 create_DynaLoader_cpp();
430 create_PerlApp_pkg();
432 if ( open( PERLAPP_MMP, ">symbian/PerlApp.mmp" ) ) {
435 push @MACRO, 'PERL_IMPLICIT_CONTEXT';
436 push @MACRO, 'MULTIPLICITY';
437 if (defined $S60SDK) {
438 push @MACRO, '__SERIES60__';
439 push @MACRO, '__SERIES60_1X__' if $S60SDK =~ /^1\./;
440 push @MACRO, '__SERIES60_2X__' if $S60SDK =~ /^2\./;
441 push @LIB, <<__EOF__;
443 LIBRARY commondialogs.lib
446 if (defined $S80SDK) {
447 push @MACRO, '__SERIES80__';
448 push @MACRO, '__SERIES80_1X__' if $S80SDK =~ /^1\./;
449 push @MACRO, '__SERIES80_2X__' if $S80SDK =~ /^2\./;
450 push @LIB, <<__EOF__;
457 if (defined $S90SDK) {
458 push @MACRO, '__SERIES90__';
459 push @LIB, <<__EOF__;
466 if (defined $UIQSDK) {
467 push @MACRO, '__UIQ__';
468 push @MACRO, '__UIQ_1X__' if $UIQSDK =~ /^1\./;
469 push @MACRO, '__UIQ_2X__' if $UIQSDK =~ /^2\./;
470 push @LIB, <<__EOF__;
477 print PERLAPP_MMP <<__EOF__;
478 // !!!!!! DO NOT EDIT THIS FILE !!!!!!
479 // This file is built by symbian\\config.pl.
480 // Any changes made here will be lost!
483 UID 0x100039CE 0x102015F6
484 TARGETPATH \\system\\apps\\PerlApp
492 USERINCLUDE \\symbian\\perl\\$R_V_SV\\include
494 SYSTEMINCLUDE \\epoc32\\include
495 SYSTEMINCLUDE \\epoc32\\include\\libc
505 LIBRARY perl$VERSION.lib
510 for my $macro (@MACRO) {
511 print PERLAPP_MMP <<__EOF__;
516 if ($SDK_VARIANT =~ /^S[689]0$/) {
517 print PERLAPP_MMP <<__EOF__;
518 AIF PerlApp.aif . PerlAppAif.rss
522 push @unclean, 'symbian\PerlApp.mmp';
525 warn "$0: failed to create symbian\\PerlApp.mmp";
528 if ( open( MAKEFILE, ">Makefile" ) ) {
529 my $perl = "perl$VERSION";
530 my $windef1 = "$SYMBIAN_ROOT\\Epoc32\\Build$CWD\\$perl\\$WIN\\$perl.def";
531 my $windef2 = "..\\BWINS\\${perl}u.def";
532 my $armdef1 = "$SYMBIAN_ROOT\\Epoc32\\Build$CWD\\$perl\\$ARM\\$perl.def";
533 my $armdef2 = "..\\BMARM\\${perl}u.def";
534 my $MF = $WIN eq 'wins' ? 'vc6' : $WIN eq 'winscw' ? 'cw_ide' : "UNKNOWN";
535 print "\tMakefile\n";
536 print MAKEFILE <<__EOF__;
538 \@echo === Perl for Symbian ===
539 \@echo Useful targets:
540 \@echo all win arm clean
541 \@echo perldll.sis perlext.sis perlsdk.zip
548 build: rename_makedef build_${WIN} build_arm
550 @unclean: symbian\\config.pl
551 perl symbian\\config.pl
553 build_${WIN}: abld.bat perldll_${WIN}
555 build_vc6: abld.bat perldll_wins
557 build_vc7: abld.bat perldll_wins
559 build_cw: abld.bat perldll_winscw
561 build_arm: abld.bat perl_arm miniperl_arm perldll_arm
563 miniperl_win miniperl_${WIN}: miniperl.mmp abld.bat rename_makedef
564 abld build ${WIN} udeb miniperl
566 miniperl_arm: miniperl.mmp abld.bat rename_makedef
567 abld build \$(ARM) $UARM miniperl
569 miniperl: miniperl_${WIN} miniperl_arm
571 perl: perl_${WIN} perl_arm
573 perl_win perl_${WIN}: perl.mmp abld.bat rename_makedef
574 abld build ${WIN} perl
576 perl_arm: perl.mmp abld.bat rename_makedef
577 abld build \$(ARM) $UARM perl
579 perldll_win perldll_${WIN}: perl${VERSION}_${WIN} freeze_${WIN} perl${VERSION}_${WIN}
581 perl${VERSION}_win perl${VERSION}_${WIN}: perl$VERSION.mmp abld.bat rename_makedef
582 abld build ${WIN} perl$VERSION
584 perldll_arm: perl${VERSION}_arm freeze_arm perl${VERSION}_arm
586 perl${VERSION}_arm: perl$VERSION.mmp abld.bat rename_makedef
587 abld build \$(ARM) $UARM perl$VERSION
589 perldll perl$VERSION: perldll_${WIN} perldll_arm
591 win ${WIN}: miniperl_${WIN} perl_${WIN} perldll_${WIN}
593 thumb arm: miniperl_arm perl_arm perldll_arm
596 -ren makedef.pl nomakedef.pl
598 # Symbian SDK has a makedef.pl of its own,
599 # and we don't need Perl's.
601 -ren nomakedef.pl makedef.pl
603 symbian\\PerlUi.rss: symbian\\PerlUi$SDK_VARIANT.rss
604 copy symbian\\PerlUi$SDK_VARIANT.rss symbian\\PerlUi.rss
606 abld.bat abld: bld.inf symbian\\PerlUi.rss
609 vc6: win.mf vc6.mf build_vc6
611 vc7: win.mf vc7.mf build_vc7
613 cw: win.mf cw.mf build_cw
615 ${WIN}_miniperl.mf: abld.bat symbian\\config.pl
616 abld makefile ${MF} miniperl
617 echo > ${WIN}_miniperl.mf
619 ${WIN}_perl.mf: abld.bat symbian\\config.pl
620 abld makefile ${MF} perl
621 echo > ${WIN}_perl.mf
623 ${WIN}_${VERSION}.mf: abld.bat symbian\\config.pl
624 abld makefile ${MF} perl${VERSION}
625 echo > ${WIN}_${VERSION}.mf
628 cd symbian; make ${WIN}.mf
630 ${WIN}.mf: ${WIN}_miniperl.mf ${WIN}_perl.mf ${WIN}_${VERSION}.mf symbian\\${WIN}.mf
632 arm_miniperl.mf: abld.bat symbian\\config.pl
633 echo > arm_miniperl.mf
635 arm_perl.mf: abld.bat symbian\\config.pl
638 arm_${VERSION}.mf: abld.bat symbian\\config.pl
639 echo > arm_${VERSION}.mf
641 arm.mf: arm_miniperl.mf arm_perl.mf arm_${VERSION}.mf
646 vc6.mf: abld.bat symbian\\config.pl
650 vc7.mf: abld.bat symbian\\config.pl
654 cw.mf: abld.bat symbian\\config.pl
658 PM = lib\\Config.pm lib\\Cross.pm lib\\lib.pm ext\\DynaLoader\\DynaLoader.pm ext\\DynaLoader\\XSLoader.pm ext\\Errno\\Errno.pm
659 POD = lib\\Config.pod
663 XLIB = -Ixlib\\symbian
665 XSBOPT = --win=\$(WIN) --arm=\$(ARM)
668 copy symbian\\config.sh config.sh
670 if (defined $S90SDK) {
671 print MAKEFILE <<__EOF__;
672 perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g; s!='(\\\\\\\\system)!='C:\\1!" config.sh
675 print MAKEFILE <<__EOF__;
676 perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g" config.sh
679 print MAKEFILE <<__EOF__;
680 perl \$(XLIB) configpm --cross=symbian
681 copy xlib\\symbian\\Config.pm lib\\Config.pm
682 perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" lib\\Config.pm
683 perl -pi.bak -e "s:5\\.\\d+\\.\\d+:$R_V_SV:g" lib\\Config.pm
684 -perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" xlib\\symbian\\Config_heavy.pl
689 ext\\DynaLoader\\DynaLoader.pm:
690 -del /f ext\\DynaLoader\\DynaLoader.pm
691 perl -Ixlib\\symbian ext\\DynaLoader\\DynaLoader_pm.PL
692 perl -pi.bak -e "s/__END__//" DynaLoader.pm
693 copy /y DynaLoader.pm ext\\DynaLoader\\DynaLoader.pm
694 -del /f DynaLoader.pm DynaLoader.pm.bak
696 ext\\DynaLoader\\XSLoader.pm:
697 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) XSLoader
699 ext\\Errno\\Errno.pm:
700 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) Errno
702 miniperlexe.sis: miniperl_arm symbian\\makesis.pl
703 perl \$(XLIB) symbian\\makesis.pl miniperl
705 perlexe.sis: perl_arm symbian\\makesis.pl
706 perl \$(XLIB) symbian\\makesis.pl perl
709 allsis: all miniperlexe.sis perlexe.sis perldll.sis perllib.sis perlext.sis perlapp.sis
711 perldll.sis perl$VERSION.sis: perldll_arm pm symbian\\makesis.pl
712 perl \$(XLIB) symbian\\makesis.pl perl${VERSION}dll
714 perl${VERSION}lib.sis perllib.sis: \$(PM)
715 perl \$(XLIB) symbian\\makesis.pl perl${VERSION}lib
717 perl${VERSION}ext.sis perlext.sis: perldll_arm buildext_sis
718 perl symbian\\makesis.pl perl${VERSION}ext
720 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 attrs
722 buildext: perldll symbian\\xsbuild.pl lib\\Config.pm
723 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) \$(EXT)
725 buildextcpp: perldll symbian\\xsbuild.pl lib\\Config.pm
726 perl \$(XLIB) symbian\\xsbuild.pl --csuffix .cpp \$(XSBOPT) \$(EXT)
728 buildext_sis: perldll.sis symbian\\xsbuild.pl lib\\Config.pm
729 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --sis \$(EXT)
731 buildextcpp_sis: perldll.sis symbian\\xsbuild.pl lib\\Config.pm
732 perl \$(XLIB) symbian\\xsbuild.pl --csuffix .cpp \$(XSBOPT) --sis \$(EXT)
734 cleanext: symbian\\xsbuild.pl
735 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT)
737 distcleanext: symbian\\xsbuild.pl
738 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --distclean \$(EXT)
740 sis makesis: miniperl perl perldll pm buildext perlapp.sis
741 perl \$(XLIB) symbian\\makesis.pl
743 APIDIR = \\Symbian\\perl\\$R_V_SV
746 -mkdir \\Symbian\\perl
747 -mkdir \\Symbian\\perl\\$R_V_SV
748 -mkdir \$(APIDIR)\\include
749 -mkdir \$(APIDIR)\\include\\symbian
750 -mkdir \$(APIDIR)\\lib
751 -mkdir \$(APIDIR)\\lib\\ExtUtils
752 -mkdir \$(APIDIR)\\pod
753 -mkdir \$(APIDIR)\\bin
755 copy /y *.h \$(APIDIR)\\include
756 -copy /y *.inc \$(APIDIR)\\include
757 copy /y lib\\ExtUtils\\xsubpp \$(APIDIR)\\lib\\ExtUtils
758 copy /y lib\\ExtUtils\\typemap \$(APIDIR)\\lib\\ExtUtils
759 copy /y lib\\ExtUtils\\ParseXS.pm \$(APIDIR)\\lib\\ExtUtils
760 copy /y symbian\\xsbuild.pl \$(APIDIR)\\bin
761 copy /y symbian\\sisify.pl \$(APIDIR)\\bin
762 copy /y symbian\\PerlBase.h \$(APIDIR)\\include
763 copy /y symbian\\PerlUi.h \$(APIDIR)\\include
764 copy /y symbian\\PerlUtil.h \$(APIDIR)\\include
765 copy /y symbian\\symbian*.h \$(APIDIR)\\include\\symbian
766 copy /y symbian\\PerlBase.pod \$(APIDIR)\\pod
767 copy /y symbian\\PerlUtil.pod \$(APIDIR)\\pod
769 RELDIR = $SYMBIAN_ROOT\\epoc32\\release
770 RELWIN = \$(RELDIR)\\\$(WIN)\\udeb
771 RELARM = \$(RELDIR)\\\$(ARM)\\$UARM
772 SDKZIP = perl${VERSION}sdk.zip
775 \$(SDKZIP) perlsdk.zip: perldll sdkinstall
776 -del /f perl${VERSION}sdk.zip
777 zip -r perl${VERSION}sdk.zip \$(RELWIN)\\perl$VERSION.* \$(RELARM)\\perl$VERSION.* \$(APIDIR)
778 \@echo perl${VERSION}sdk.zip created.
780 PERLSIS = perl${VERSION}.SIS perl${VERSION}lib.SIS perl${VERSION}ext.SIS
781 ALLSIS = \$(PERLSIS) perlapp.sis
782 ETC = README.symbian symbian\\PerlBase.pod symbian\\PerlUtil.pod symbian\\sisify.pl symbian\\TODO
784 perl${VERSION}dist.zip perldist.zip: \$(ALLSIS) \$(SDKZIP) \$(ETC)
785 -del /f perl${VERSION}dist.zip
786 zip -r perl${VERSION}dist.zip \$(ALLSIS) \$(SDKZIP) \$(ETC)
788 perlapp: sdkinstall perlapp_${WIN} perlapp_arm
790 perlapp_arm_minimal sisify_hex perlappmin.hex perlrscmin.hex: sdkinstall config.h
791 cd symbian; make perlapp_arm USERDEFS=-DCreatePerlAppMinimal
792 perl symbian\\hexdump.pl
794 perlapp_win perlapp_${WIN}: config.h
795 cd symbian; make perlapp_${WIN}
797 perlapp_arm: config.h
798 cd symbian; make perlapp_arm
801 cd symbian; make clean
803 perlapp_demo_extract:
804 cd symbian; make perlapp_demo_extract
806 perlapp.sis: perlapp_arm
807 cd symbian; make perlapp.sis
810 cd symbian; zip perlapp.zip PerlApp.* PerlRecog.* PerlBase.* PerlUtil.* demo_pl
812 zip: perlsdk.zip perlapp.zip
814 freeze: freeze_${WIN} freeze_arm
817 abld freeze ${WIN} perl$VERSION
820 abld freeze \$(ARM) perl$VERSION
822 defrost: defrost_${WIN} defrost_arm
832 clean_${WIN}: abld.bat
838 clean: clean_${WIN} clean_arm rerename_makedef
841 -del /f lib\\Config.pm.bak
842 -del /f xlib\\symbian\\Config_heavy.pl
845 -del /f DynaLoader.pm ext\\DynaLoader\\DynaLoader.pm
846 -del /f ext\\DynaLoader\\Makefile
847 -del /f ext\\SDBM_File\\sdbm\\Makefile
848 -del /f symbian\\*.lst
849 -del /f abld.bat @unclean *.pkg *.sis *.zip
850 -del /f symbian\\abld.bat symbian\\*.sis symbian\\*.zip
851 -del /f symbian\\perl5*.pkg symbian\\miniperl.pkg
852 -del arm_*.mf ${WIN}_*.mf vc*.mf cw*.mf
853 -del symbian\\Makefile
854 -del symbian\\PerlUi.rss symbian\\PerlApp.rss
855 -del perlappmin.hex perlrscmin.hex
856 -perl symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT)
857 -rmdir /s /q perl${VERSION}_Data
858 -cd symbian; make clean
860 reallyclean: abld.bat
863 distclean: defrost reallyclean clean
864 -perl symbian\\xsbuild.pl \$(XSBOPT) --distclean \$(EXT)
865 -del /f config.h config.sh.bak symbian\\symbian_port.h
866 -del /f Makefile symbian\\PerlApp.mmp
868 -del /f *.cwlink *.resources *.pref
869 -del /f perl${VERSION}.xml perl${VERSION}.mcp uid.cpp
871 cd symbian; make distclean
872 -del /f symbian\\Makefile
877 warn "$0: failed to create Makefile: $!\n";
880 if ( open( MAKEFILE, ">symbian/Makefile")) {
881 my $wrap = defined $S60SDK && $S60SDK eq '1.2' && $WIN ne '${WIN}cw';
882 my $ABLD = $wrap ? 'perl b.pl': 'abld';
883 print "\tsymbian/Makefile\n";
884 my $MF = $WIN eq 'wins' ? 'vc6' : $WIN eq 'winscw' ? 'cw_ide' : "UNKNOWN";
885 print MAKEFILE <<__EOF__;
894 perlapp_${WIN}: abld.bat ..\\config.h PerlApp.h PerlApp.cpp
895 copy PerlUi$SDK_VARIANT.rss PerlApp.rss
897 \$(ABLD) build ${WIN} udeb
899 perlapp_arm: ..\\config.h PerlApp.h PerlApp.cpp
900 copy PerlUi$SDK_VARIANT.rss PerlApp.rss
902 \$(ABLD) build ${ARM} $UARM
911 perlapp_demo_extract:
914 perlapp.sis: perlapp_arm perlapp_demo_extract
917 copy /y perlapp.SIS ..\\perlapp.SIS
920 -perl demo_pl cleanup
929 -del /f *.cwlink *.resources *.pref
930 -del /f PerlApp.xml PerlApp.mcp uid.cpp
931 -rmdir /s /q PerlApp_Data
936 if ( open( B_PL, ">symbian/b.pl")) {
937 print B_PL <<'__EOF__';
940 # nmake doesn't like MFLAGS and MAKEFLAGS being set to -w and w.
942 delete $ENV{MAKEFLAGS};
944 system("abld @ARGV");
948 warn "$0: failed to create symbian/b.pl: $!\n";
952 warn "$0: failed to create symbian/Makefile: $!\n";
955 print "Deleting...\n";
957 # Do not delete config.h here.
960 "xlib\\symbian\\Config.pm",
961 "xlib\\symbian\\Config_heavy.pl",
962 "symbian\\PerlUi.rss",
963 "symbian\\PerlApp.rss",