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)
35 my $UREL = $ENV{UREL}; # from sdk.pl
36 $UREL =~ s/-ARM-/$ARM/;
37 my $UARM = $ENV{UARM}; # from sdk.pl
39 die "$0: SDK not recognized\n"
40 if !defined($SYMBIAN_VERSION) ||
41 !defined($SDK_VERSION) ||
42 (!defined($S60SDK) && !defined($S80SDK));
44 die "$0: does not know which Windows compiler to use\n"
47 print "Symbian $SYMBIAN_VERSION SDK $SDK_VARIANT $SDK_VERSION ($WIN) installed at $SYMBIAN_ROOT\n";
49 my $CWD = do "cwd.pl";
50 print "Build directory $CWD\n";
52 die "$0: '+' in cwd does not work with Series 60 SDK 1.2\n"
53 if defined $S60SDK && $S60SDK eq '1.2' && $CWD =~ /\+/;
59 my ( $target, $type, @x ) = @_;
60 my $miniperl = $target eq 'miniperl';
61 my $perl = $target eq 'perl';
62 my $mmp = "$target.mmp";
63 my $targetpath = $miniperl
64 || $perl ? "TARGETPATH\t\\System\\Apps\\Perl" : "";
65 if ( open( my $fh, ">$mmp" ) ) {
73 EPOCHEAPSIZE 1024 8388608
78 if ($SDK_VARIANT eq 'S60') {
79 print $fh "MACRO\t__SERIES60__\n";
80 print $fh "MACRO\t__SERIES60_1X__\n" if $S60SDK =~ /^1\./;
81 print $fh "MACRO\t__SERIES60_2X__\n" if $S60SDK =~ /^2\./;
83 if ($SDK_VARIANT eq 'S80') {
84 print $fh "MACRO\t__SERIES80__\n";
85 print $fh "MACRO\t__SERIES80_1X__\n" if $S80SDK =~ /^1\./;
86 print $fh "MACRO\t__SERIES80_2X__\n" if $S80SDK =~ /^2\./;
89 @c = map { glob } qw(*.c); # Find the .c files.
90 @c = map { lc } @c; # Lowercase the names.
91 @c = grep { !/malloc\.c/ } @c; # Use the system malloc.
92 @c = grep { !/main\.c/ } @c; # main.c must be explicit.
93 push @c, map { lc } @x;
94 @c = map { s:^\.\./::; $_ } @c; # Remove the leading ../
95 @c = map { $c{$_}++ } @c; # Uniquefy.
96 @c = sort keys %c; # Beautify.
99 print $fh "SOURCE\t\t$_\n";
104 USERINCLUDE $CWD\\ext\\DynaLoader
105 USERINCLUDE $CWD\\symbian
106 SYSTEMINCLUDE \\epoc32\\include\\libc
107 SYSTEMINCLUDE \\epoc32\\include
111 if ( $miniperl || $perl || $type eq 'dll' ) {
114 LIBRARY commonengine.lib
119 if ( $type eq 'exe' ) {
121 STATICLIBRARY ecrt0.lib
137 MACRO PERL_IMPLICIT_CONTEXT
139 unless ( $miniperl || $perl ) {
141 MACRO PERL_GLOBAL_STRUCT
142 MACRO PERL_GLOBAL_STRUCT_PRIVATE
148 warn "$0: failed to open $mmp for writing: $!\n";
153 if ( open( BLD_INF, ">bld.inf" ) ) {
155 push @unclean, "bld.inf";
156 print BLD_INF <<__EOF__;
161 for (@mmp) { print BLD_INF $_, "\n" }
165 warn "$0: failed to open bld.inf for writing: $!\n";
172 if ( open( CONFIG_SH, "symbian/config.sh" ) ) {
173 while (<CONFIG_SH>) {
174 if (/^(\w+)=['"]?(.*?)["']?$/) {
175 my ( $var, $val ) = ( $1, $2 );
176 $val =~ s/x.y.z/$R_V_SV/gi;
177 $val =~ s/thumb/$ARM/gi;
178 $val = "'$SYMBIAN_VERSION'" if $var eq 'osvers';
179 $val = "'$SDK_VERSION'" if $var eq 'sdkvers';
180 $config{$var} = $val;
186 warn "$0: failed to open symbian\\config.sh for reading: $!\n";
190 sub create_config_h {
192 if ( open( CONFIG_H, ">config.h" ) ) {
193 print "\tconfig.h\n";
194 push @unclean, "config.h";
195 if ( open( CONFIG_H_SH, "config_h.SH" ) ) {
196 while (<CONFIG_H_SH>) {
197 last if /\#ifndef _config_h_/;
199 print CONFIG_H <<__EOF__;
201 * Package name : perl
202 * Source directory : .
203 * Configuration time:
205 * Target system : symbian
210 while (<CONFIG_H_SH>) {
211 last if /!GROK!THIS/;
212 s/\$(\w+)/exists $config{$1} ? $config{$1} : ""/eg;
213 s/^#undef\s+(\S+).+/#undef $1/g;
220 warn "$0: failed to open ../config_h.SH for reading: $!\n";
225 warn "$0: failed to open config.h for writing: $!\n";
229 sub create_DynaLoader_cpp {
230 print "\text\\DynaLoader\\DynaLoader.cpp\n";
232 q[perl -Ilib lib\ExtUtils\xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp]
234 or die "$0: creating DynaLoader.cpp failed: $!\n";
235 push @unclean, 'ext\DynaLoader\DynaLoader.cpp';
239 sub create_symbian_port_h {
240 print "\tsymbian\\symbian_port.h\n";
241 if ( open( SYMBIAN_PORT_H, ">symbian/symbian_port.h" ) ) {
242 my ($sdkmajor, $sdkminor);
243 if ($SDK_VARIANT eq 'S60') {
244 $S60SDK =~ /^(\d+)\.(\d+)$/;
245 ($sdkmajor, $sdkminor) = ($1, $2);
247 if ($SDK_VARIANT eq 'S80') {
248 $S80SDK =~ /^(\d+)\.(\d+)$/;
249 ($sdkmajor, $sdkminor) = ($1, $2);
251 print SYMBIAN_PORT_H <<__EOF__;
252 /* Copyright (c) 2004-2005, Nokia. All rights reserved. */
254 #ifndef __symbian_port_h__
255 #define __symbian_port_h__
257 #define PERL_SYMBIANPORT_MAJOR $PORT{dll}->{MAJOR}
258 #define PERL_SYMBIANPORT_MINOR $PORT{dll}->{MINOR}
259 #define PERL_SYMBIANPORT_PATCH $PORT{dll}->{PATCH}
261 #define PERL_SYMBIANSDK_FLAVOR L"$SDK_VARIANT"
262 #define PERL_SYMBIANSDK_MAJOR $sdkmajor
263 #define PERL_SYMBIANSDK_MINOR $sdkminor
265 #endif /* #ifndef __symbian_port_h__ */
267 close(SYMBIAN_PORT_H);
268 push @unclean, 'symbian\symbian_port.h';
271 warn "$0: failed to open symbian/symbian_port.h for writing: $!\n";
275 sub create_perlmain_c {
276 print "\tperlmain.c\n";
278 q[perl -ne "print qq[ char *file = __FILE__;\n] if /dXSUB_SYS/;print;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]
280 or die "$0: Creating perlmain.c failed: $!\n";
281 push @unclean, 'perlmain.c';
284 sub create_PerlApp_pkg {
285 print "\tsymbian\\PerlApp.pkg\n";
286 if ( open( PERLAPP_PKG, ">symbian\\PerlApp.pkg" ) ) {
289 qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] :
291 qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] :
292 ";Supports Series NN";
294 if (($SDK_VARIANT eq 'S60' && $SDK_VERSION ne '1.2' || $WIN eq 'winscw') || defined $S80SDK) { # Do only if not in S60 1.2 VC.
295 $APPS =~ s!\\epoc32\\release\\(.+)\\$UARM$!\\epoc32\\data\\z\\system\\apps\\PerlApp!i;
297 # In S60 3.0 there will be no more recognizers.
298 my $mdl = qq["$UREL\\PerlRecog.mdl"-"!:\\system\\recogs\\PerlRecog.mdl";];
299 print PERLAPP_PKG <<__EOF__;
300 ; !!!!!! DO NOT EDIT THIS FILE !!!!!!
301 ; This file is built by symbian\\config.pl.
302 ; Any changes made here will be lost!
306 ; Note that the demo_pl needs to be run to create the demo .pl scripts.
311 ; Standard SIS file header
312 #{"PerlApp"},(0x102015F6),0,2,0
317 "$UREL\\PerlApp.APP"-"!:\\system\\apps\\PerlApp\\PerlApp.app"
319 "$APPS\\PerlApp.rsc"-"!:\\system\\apps\\PerlApp\\PerlApp.rsc"
320 "$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"
322 if ( open( DEMOS, "perl symbian\\demo_pl list |" ) ) {
325 print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n];
332 die "$0: symbian\\PerlApp.pkg: $!\n";
334 push @unclean, 'symbian\PerlApp.pkg';
337 print "Creating...\n";
340 'miniperlmain.c', 'symbian\symbian_stubs.c',
341 'symbian\PerlBase.cpp',
342 'symbian\PerlUtil.cpp',
343 'symbian\symbian_utils.cpp',
347 'perlmain.c', 'symbian\symbian_stubs.c',
348 'symbian\symbian_utils.cpp', 'symbian\PerlBase.cpp',
349 'symbian\PerlUtil.cpp',
350 'ext\DynaLoader\DynaLoader.cpp',
354 "perl$VERSION", 'dll',
355 'symbian\symbian_dll.cpp', 'symbian\symbian_stubs.c',
356 'symbian\symbian_utils.cpp', 'symbian\PerlBase.cpp',
357 'symbian\PerlUtil.cpp',
358 'ext\DynaLoader\DynaLoader.cpp',
364 create_symbian_port_h();
365 create_DynaLoader_cpp();
366 create_PerlApp_pkg();
368 if ( open( PERLAPP_MMP, ">symbian/PerlApp.mmp" ) ) {
371 if (defined $S60SDK) {
372 push @MACRO, '__SERIES60__';
373 push @MACRO, '__SERIES60_1X__' if $S60SDK =~ /^1\./;
374 push @MACRO, '__SERIES60_2X__' if $S60SDK =~ /^2\./;
375 push @LIB, <<__EOF__;
377 LIBRARY commondialogs.lib
380 if (defined $S80SDK) {
381 push @MACRO, '__SERIES80__';
382 push @MACRO, '__SERIES80_1X__' if $S80SDK =~ /^1\./;
383 push @MACRO, '__SERIES80_2X__' if $S80SDK =~ /^2\./;
384 push @LIB, <<__EOF__;
390 print PERLAPP_MMP <<__EOF__;
391 // !!!!!! DO NOT EDIT THIS FILE !!!!!!
392 // This file is built by symbian\\config.pl.
393 // Any changes made here will be lost!
396 UID 0x100039CE 0x102015F6
397 TARGETPATH \\system\\apps\\PerlApp
407 USERINCLUDE \\symbian\\perl\\$R_V_SV\\include
409 SYSTEMINCLUDE \\epoc32\\include
410 SYSTEMINCLUDE \\epoc32\\include\\libc
420 LIBRARY perl$VERSION.lib
423 AIF PerlApp.aif . PerlAppAif.rss
426 for my $macro (@MACRO) {
427 print PERLAPP_MMP <<__EOF__;
433 push @unclean, 'symbian\PerlApp.mmp';
436 warn "$0: failed to create symbian\\PerlApp.mmp";
439 if ( open( MAKEFILE, ">Makefile" ) ) {
440 my $perl = "perl$VERSION";
441 my $windef1 = "$SYMBIAN_ROOT\\Epoc32\\Build$CWD\\$perl\\$WIN\\$perl.def";
442 my $windef2 = "..\\BWINS\\${perl}u.def";
443 my $armdef1 = "$SYMBIAN_ROOT\\Epoc32\\Build$CWD\\$perl\\$ARM\\$perl.def";
444 my $armdef2 = "..\\BMARM\\${perl}u.def";
445 print "\tMakefile\n";
446 print MAKEFILE <<__EOF__;
448 \@echo === Perl for Symbian ===
449 \@echo Useful targets:
450 \@echo all win arm clean
451 \@echo perldll.sis perlext.sis perlsdk.zip
458 build: rename_makedef build_${WIN} build_arm
460 @unclean: symbian\\config.pl
461 perl symbian\\config.pl
463 build_${WIN}: abld.bat ${WIN}_perl.mf ${WIN}_miniperl.mf ${WIN}_${VERSION}.mf perldll_${WIN}
465 build_vc6: abld.bat ${WIN}_perl.mf ${WIN}_miniperl.mf ${WIN}_${VERSION}.mf vc6.mf perldll_wins
467 build_cw: abld.bat ${WIN}_perl.mf ${WIN}_miniperl.mf ${WIN}_${VERSION}.mf cw.mf perldll_winscw
469 build_arm: abld.bat perl_arm miniperl_arm arm_${VERSION}.mf perldll_arm
471 miniperl_win miniperl_${WIN}: miniperl.mmp abld.bat ${WIN}_miniperl.mf rename_makedef
472 abld build ${WIN} udeb miniperl
474 miniperl_arm: miniperl.mmp abld.bat arm_miniperl.mf rename_makedef
475 abld build \$(ARM) $UARM miniperl
477 miniperl: miniperl_${WIN} miniperl_arm
479 perl: perl_${WIN} perl_arm
481 perl_win perl_${WIN}: perl.mmp abld.bat ${WIN}_perl.mf rename_makedef
482 abld build ${WIN} perl
484 perl_arm: perl.mmp abld.bat arm_perl.mf rename_makedef
485 abld build \$(ARM) $UARM perl
487 perldll_win perldll_${WIN}: perl${VERSION}_${WIN} freeze_${WIN} perl${VERSION}_${WIN}
489 perl${VERSION}_win perl${VERSION}_${WIN}: perl$VERSION.mmp abld.bat rename_makedef
490 abld build ${WIN} perl$VERSION
492 perldll_arm: perl${VERSION}_arm freeze_arm perl${VERSION}_arm
494 perl${VERSION}_arm: perl$VERSION.mmp arm_${VERSION}.mf abld.bat rename_makedef
495 abld build \$(ARM) $UARM perl$VERSION
497 perldll perl$VERSION: perldll_${WIN} perldll_arm
499 win ${WIN}: miniperl_${WIN} perl_${WIN} perldll_${WIN}
501 thumb arm: miniperl_arm perl_arm perldll_arm
504 -ren makedef.pl nomakedef.pl
506 # Symbian SDK has a makedef.pl of its own,
507 # and we don't need Perl's.
509 -ren nomakedef.pl makedef.pl
511 abld.bat abld: bld.inf
514 makefiles: win.mf arm.mf vc6.mf cw.mf
516 vc6: win.mf vc6.mf build_vc6
518 cw: win.mf cw.mf build_cw
520 ${WIN}_miniperl.mf: abld.bat symbian\\config.pl
521 abld makefile ${WIN} miniperl
522 echo > ${WIN}_miniperl.mf
524 ${WIN}_perl.mf: abld.bat symbian\\config.pl
525 abld makefile ${WIN} perl
526 echo > ${WIN}_perl.mf
528 ${WIN}_${VERSION}.mf: abld.bat symbian\\config.pl
529 abld makefile ${WIN} perl${VERSION}
530 echo > ${WIN}_${VERSION}.mf
533 cd symbian; make ${WIN}.mf
535 ${WIN}.mf: ${WIN}_miniperl.mf ${WIN}_perl.mf ${WIN}_${VERSION}.mf symbian\\${WIN}.mf
537 arm_miniperl.mf: abld.bat symbian\\config.pl
538 abld makefile \$(ARM) miniperl
539 echo > arm_miniperl.mf
541 arm_perl.mf: abld.bat symbian\\config.pl
542 abld makefile \$(ARM) perl
545 arm_${VERSION}.mf: abld.bat symbian\\config.pl
546 abld makefile \$(ARM) perl${VERSION}
547 echo > arm_${VERSION}.mf
549 arm.mf: arm_miniperl.mf arm_perl.mf arm_${VERSION}.mf
554 vc6.mf: abld.bat symbian\\config.pl
558 cw.mf: abld.bat symbian\\config.pl
562 PM = lib\\Config.pm lib\\Cross.pm lib\\lib.pm ext\\DynaLoader\\DynaLoader.pm ext\\DynaLoader\\XSLoader.pm ext\\Errno\\Errno.pm
563 POD = lib\\Config.pod
567 XLIB = -Ixlib\\symbian
569 XSBOPT = --win=\$(WIN) --arm=\$(ARM)
572 copy symbian\\config.sh config.sh
573 perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g" config.sh
574 perl \$(XLIB) configpm --cross=symbian
575 copy xlib\\symbian\\Config.pm lib\\Config.pm
576 perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" lib\\Config.pm
577 perl -pi.bak -e "s:5\\.\\d+\\.\\d+:$R_V_SV:g" lib\\Config.pm
578 -perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" xlib\\symbian\\Config_heavy.pl
583 ext\\DynaLoader\\DynaLoader.pm:
584 -del /f ext\\DynaLoader\\DynaLoader.pm
585 perl -Ixlib\\symbian ext\\DynaLoader\\DynaLoader_pm.PL
586 perl -pi.bak -e "s/__END__//" DynaLoader.pm
587 copy /y DynaLoader.pm ext\\DynaLoader\\DynaLoader.pm
588 -del /f DynaLoader.pm DynaLoader.pm.bak
590 ext\\DynaLoader\\XSLoader.pm:
591 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) XSLoader
593 ext\\Errno\\Errno.pm:
594 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) Errno
596 miniperlexe.sis: miniperl_arm symbian\\makesis.pl
597 perl \$(XLIB) symbian\\makesis.pl miniperl
599 perlexe.sis: perl_arm symbian\\makesis.pl
600 perl \$(XLIB) symbian\\makesis.pl perl
603 allsis: all miniperlexe.sis perlexe.sis perldll.sis perllib.sis perlext.sis perlapp.sis
605 perldll.sis perl$VERSION.sis: perldll_arm pm symbian\\makesis.pl
606 perl \$(XLIB) symbian\\makesis.pl perl${VERSION}dll
608 perl${VERSION}lib.sis perllib.sis: \$(PM)
609 perl \$(XLIB) symbian\\makesis.pl perl${VERSION}lib
611 perl${VERSION}ext.sis perlext.sis: perldll_arm buildext_sis
612 perl symbian\\makesis.pl perl${VERSION}ext
614 EXT = Compress::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
616 buildext: perldll symbian\\xsbuild.pl lib\\Config.pm
617 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) \$(EXT)
619 buildext_sis: perldll.sis symbian\\xsbuild.pl lib\\Config.pm
620 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --sis \$(EXT)
622 cleanext: symbian\\xsbuild.pl
623 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT)
625 distcleanext: symbian\\xsbuild.pl
626 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --distclean \$(EXT)
628 sis makesis: miniperl perl perldll pm buildext perlapp.sis
629 perl \$(XLIB) symbian\\makesis.pl
631 APIDIR = \\Symbian\\perl\\$R_V_SV
634 -mkdir \\Symbian\\perl
635 -mkdir \\Symbian\\perl\\$R_V_SV
636 -mkdir \$(APIDIR)\\include
637 -mkdir \$(APIDIR)\\include\\symbian
638 -mkdir \$(APIDIR)\\lib
639 -mkdir \$(APIDIR)\\lib\\ExtUtils
640 -mkdir \$(APIDIR)\\pod
641 -mkdir \$(APIDIR)\\bin
643 copy /y *.h \$(APIDIR)\\include
644 - copy /y *.inc \$(APIDIR)\\include
645 copy /y lib\\ExtUtils\\xsubpp \$(APIDIR)\\lib\\ExtUtils
646 copy /y lib\\ExtUtils\\typemap \$(APIDIR)\\lib\\ExtUtils
647 copy /y lib\\ExtUtils\\ParseXS.pm \$(APIDIR)\\lib\\ExtUtils
648 copy /y symbian\\xsbuild.pl \$(APIDIR)\\bin
649 copy /y symbian\\sisify.pl \$(APIDIR)\\bin
650 copy /y symbian\\PerlBase.h \$(APIDIR)\\include
651 copy /y symbian\\PerlUtil.h \$(APIDIR)\\include
652 copy /y symbian\\symbian*.h \$(APIDIR)\\include\\symbian
653 copy /y symbian\\PerlBase.pod \$(APIDIR)\\pod
654 copy /y symbian\\PerlUtil.pod \$(APIDIR)\\pod
656 RELDIR = $SYMBIAN_ROOT\\epoc32\\release
657 RELWIN = \$(RELDIR)\\\$(WIN)\\udeb
658 RELARM = \$(RELDIR)\\\$(ARM)\\$UARM
659 SDKZIP = perl${VERSION}sdk.zip
662 \$(SDKZIP) perlsdk.zip: perldll sdkinstall
663 -del /f perl${VERSION}sdk.zip
664 zip -r perl${VERSION}sdk.zip \$(RELWIN)\\perl$VERSION.* \$(RELARM)\\perl$VERSION.* \$(APIDIR)
665 \@echo perl${VERSION}sdk.zip created.
667 PERLSIS = perl${VERSION}.SIS perl${VERSION}lib.SIS perl${VERSION}ext.SIS
668 ALLSIS = \$(PERLSIS) perlapp.sis
669 ETC = README.symbian symbian\\PerlBase.pod symbian\\PerlUtil.pod symbian\\sisify.pl symbian\\TODO
671 perl${VERSION}dist.zip perldist.zip: \$(ALLSIS) \$(SDKZIP) \$(ETC)
672 -del /f perl${VERSION}dist.zip
673 zip -r perl${VERSION}dist.zip \$(ALLSIS) \$(SDKZIP) \$(ETC)
675 perlapp: sdkinstall perlapp_${WIN} perlapp_arm
677 perlapp_win perlapp_${WIN}: config.h
678 cd symbian; make perlapp_${WIN}
680 perlapp_arm: config.h
681 cd symbian; make perlapp_arm
683 perlapp_demo_extract:
684 cd symbian; make perlapp_demo_extract
686 perlapp.sis: perlapp_arm
687 cd symbian; make perlapp.sis
690 cd symbian; zip perlapp.zip PerlApp.* PerlRecog.* PerlBase.* PerlUtil.* demo_pl
692 zip: perlsdk.zip perlapp.zip
694 freeze: freeze_${WIN} freeze_arm
697 abld freeze ${WIN} perl$VERSION
700 abld freeze \$(ARM) perl$VERSION
702 defrost: defrost_${WIN} defrost_arm
712 clean_${WIN}: abld.bat
718 clean: clean_${WIN} clean_arm rerename_makedef
721 -del /f lib\\Config.pm.bak
722 -del /f xlib\\symbian\\Config_heavy.pl
725 -del /f DynaLoader.pm ext\\DynaLoader\\DynaLoader.pm
726 -del /f ext\\DynaLoader\\Makefile
727 -del /f ext\\SDBM_File\\sdbm\\Makefile
728 -del /f symbian\\*.lst
729 -del /f abld.bat @unclean *.pkg *.sis *.zip
730 -del /f symbian\\abld.bat symbian\\*.sis symbian\\*.zip
731 -del /f symbian\\perl5*.pkg symbian\\miniperl.pkg
732 -del /f symbian\\PerlApp.rss
733 -del arm_*.mf ${WIN}_*.mf vc6*.mf cw*.mf
734 -perl symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT)
735 -rmdir /s /q perl${VERSION}_Data
736 -cd symbian; make clean
738 reallyclean: abld.bat
741 distclean: defrost reallyclean clean
742 -perl symbian\\xsbuild.pl \$(XSBOPT) --distclean \$(EXT)
743 -del /f config.h config.sh.bak symbian\\symbian_port.h
744 -del /f Makefile symbian\\PerlApp.mmp
746 -del /f *.cwlink *.resources *.pref
747 -del /f perl${VERSION}.xml perl${VERSION}.mcp uid.cpp
749 cd symbian; make distclean
750 -del /f symbian\\Makefile
755 warn "$0: failed to create Makefile: $!\n";
758 if ( open( MAKEFILE, ">symbian/Makefile")) {
759 my $wrap = defined $S60SDK && $S60SDK eq '1.2' && $WIN ne '${WIN}cw';
760 my $ABLD = $wrap ? 'perl b.pl': 'abld';
761 print "\tsymbian/Makefile\n";
762 print MAKEFILE <<__EOF__;
770 perlapp_${WIN}: abld.bat ..\\config.h PerlApp.h PerlApp.cpp
772 copy PerlApp$SDK_VARIANT.rss PerlApp.rss
773 \$(ABLD) build ${WIN} udeb
775 perlapp_arm: ..\\config.h PerlApp.h PerlApp.cpp
777 copy PerlApp$SDK_VARIANT.rss PerlApp.rss
778 \$(ABLD) build ${ARM} $UARM
785 perlapp_demo_extract:
788 perlapp.sis: perlapp_arm perlapp_demo_extract
791 copy /y perlapp.SIS ..\\perlapp.SIS
794 -perl demo_pl cleanup
799 -del /f *.cwlink *.resources *.pref
800 -del /f PerlApp.xml PerlApp.mcp uid.cpp
801 -rmdir /s /q PerlApp_Data
806 if ( open( B_PL, ">symbian/b.pl")) {
807 print B_PL <<'__EOF__';
810 # nmake doesn't like MFLAGS and MAKEFLAGS being set to -w and w.
812 delete $ENV{MAKEFLAGS};
814 system("abld @ARGV");
818 warn "$0: failed to create symbian/b.pl: $!\n";
822 warn "$0: failed to create symbian/Makefile: $!\n";
825 print "Deleting...\n";
827 # Do not delete config.h here.
830 "xlib\\symbian\\Config.pm",
831 "xlib\\symbian\\Config_heavy.pl",