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 $SDK = do "sdk.pl";
23 my %PORT = %{ do "port.pl" };
25 my ( $SYMBIAN_VERSION, $SDK_VERSION ) = ( $SDK =~ m!\\Symbian\\(.+?)\\(.+)$! );
27 if ($SDK eq 'C:\Symbian\Series60_1_2_CW') {
28 ( $SYMBIAN_VERSION, $SDK_VERSION ) = qw(6.1 1.2);
31 my $WIN = $ENV{WIN} ; # 'wins', 'winscw' (from sdk.pl)
32 my $ARM = 'thumb'; # 'thumb', 'armi'
33 my $S60SDK = $ENV{S60SDK}; # qw(1.2 2.0 2.1 2.6) (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) || !defined($SDK_VERSION) || !defined($S60SDK);
42 die "$0: does not know which Windows compiler to use\n"
45 print "Symbian $SYMBIAN_VERSION SDK $S60SDK ($WIN) installed at $SDK\n";
47 my $CWD = do "cwd.pl";
48 print "Build directory $CWD\n";
50 die "$0: '+' in cwd does not work with SDK 1.2\n"
51 if $S60SDK eq '1.2' && $CWD =~ /\+/;
57 my ( $target, $type, @x ) = @_;
58 my $miniperl = $target eq 'miniperl';
59 my $perl = $target eq 'perl';
60 my $mmp = "$target.mmp";
61 my $targetpath = $miniperl
62 || $perl ? "TARGETPATH\t\\System\\Apps\\Perl" : "";
63 if ( open( my $fh, ">$mmp" ) ) {
71 EPOCHEAPSIZE 1024 8388608
76 print $fh "MACRO\t__SERIES60_1X__\n" if $S60SDK =~ /^1\./;
77 print $fh "MACRO\t__SERIES60_2X__\n" if $S60SDK =~ /^2\./;
79 @c = map { glob } qw(*.c); # Find the .c files.
80 @c = map { lc } @c; # Lowercase the names.
81 @c = grep { !/malloc\.c/ } @c; # Use the system malloc.
82 @c = grep { !/main\.c/ } @c; # main.c must be explicit.
83 push @c, map { lc } @x;
84 @c = map { s:^\.\./::; $_ } @c; # Remove the leading ../
85 @c = map { $c{$_}++ } @c; # Uniquefy.
86 @c = sort keys %c; # Beautify.
89 print $fh "SOURCE\t\t$_\n";
94 USERINCLUDE $CWD\\ext\\DynaLoader
95 USERINCLUDE $CWD\\symbian
96 SYSTEMINCLUDE \\epoc32\\include\\libc
97 SYSTEMINCLUDE \\epoc32\\include
101 if ( $miniperl || $perl || $type eq 'dll' ) {
104 LIBRARY commonengine.lib
109 if ( $type eq 'exe' ) {
111 STATICLIBRARY ecrt0.lib
127 MACRO PERL_IMPLICIT_CONTEXT
129 unless ( $miniperl || $perl ) {
131 MACRO PERL_GLOBAL_STRUCT
132 MACRO PERL_GLOBAL_STRUCT_PRIVATE
138 warn "$0: failed to open $mmp for writing: $!\n";
143 if ( open( BLD_INF, ">bld.inf" ) ) {
145 push @unclean, "bld.inf";
146 print BLD_INF <<__EOF__;
151 for (@mmp) { print BLD_INF $_, "\n" }
155 warn "$0: failed to open bld.inf for writing: $!\n";
162 if ( open( CONFIG_SH, "symbian/config.sh" ) ) {
163 while (<CONFIG_SH>) {
164 if (/^(\w+)=['"]?(.*?)["']?$/) {
165 my ( $var, $val ) = ( $1, $2 );
166 $val =~ s/x.y.z/$R_V_SV/gi;
167 $val =~ s/thumb/$ARM/gi;
168 $val = "'$SYMBIAN_VERSION'" if $var eq 'osvers';
169 $val = "'$SDK_VERSION'" if $var eq 'sdkvers';
170 $config{$var} = $val;
176 warn "$0: failed to open symbian\\config.sh for reading: $!\n";
180 sub create_config_h {
182 if ( open( CONFIG_H, ">config.h" ) ) {
183 print "\tconfig.h\n";
184 push @unclean, "config.h";
185 if ( open( CONFIG_H_SH, "config_h.SH" ) ) {
186 while (<CONFIG_H_SH>) {
187 last if /\#ifndef _config_h_/;
189 print CONFIG_H <<__EOF__;
191 * Package name : perl
192 * Source directory : .
193 * Configuration time:
195 * Target system : symbian
200 while (<CONFIG_H_SH>) {
201 last if /!GROK!THIS/;
202 s/\$(\w+)/exists $config{$1} ? $config{$1} : ""/eg;
203 s/^#undef\s+(\S+).+/#undef $1/g;
210 warn "$0: failed to open ../config_h.SH for reading: $!\n";
215 warn "$0: failed to open config.h for writing: $!\n";
219 sub create_DynaLoader_cpp {
220 print "\text\\DynaLoader\\DynaLoader.cpp\n";
222 q[perl -Ilib lib\ExtUtils\xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp]
224 or die "$0: creating DynaLoader.cpp failed: $!\n";
225 push @unclean, 'ext\DynaLoader\DynaLoader.cpp';
229 sub create_symbian_port_h {
230 print "\tsymbian\\symbian_port.h\n";
231 if ( open( SYMBIAN_PORT_H, ">symbian/symbian_port.h" ) ) {
232 $S60SDK =~ /^(\d+)\.(\d+)$/;
233 my ($sdkmajor, $sdkminor) = ($1, $2);
234 print SYMBIAN_PORT_H <<__EOF__;
235 /* Copyright (c) 2004-2005, Nokia. All rights reserved. */
237 #ifndef __symbian_port_h__
238 #define __symbian_port_h__
240 #define PERL_SYMBIANPORT_MAJOR $PORT{dll}->{MAJOR}
241 #define PERL_SYMBIANPORT_MINOR $PORT{dll}->{MINOR}
242 #define PERL_SYMBIANPORT_PATCH $PORT{dll}->{PATCH}
244 #define PERL_SYMBIANSDK_FLAVOR L"Series 60"
245 #define PERL_SYMBIANSDK_MAJOR $sdkmajor
246 #define PERL_SYMBIANSDK_MINOR $sdkminor
248 #endif /* #ifndef __symbian_port_h__ */
250 close(SYMBIAN_PORT_H);
251 push @unclean, 'symbian\symbian_port.h';
254 warn "$0: failed to open symbian/symbian_port.h for writing: $!\n";
258 sub create_perlmain_c {
259 print "\tperlmain.c\n";
261 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]
263 or die "$0: Creating perlmain.c failed: $!\n";
264 push @unclean, 'perlmain.c';
267 sub create_PerlApp_pkg {
268 print "\tsymbian\\PerlApp.pkg\n";
269 if ( open( PERLAPP_PKG, ">symbian\\PerlApp.pkg" ) ) {
271 if ($S60SDK ne '1.2' || $SDK =~ m/_CW$/) { # Do only if not in 1.2 VC.
272 $APPS =~ s!\\epoc32\\release\\(.+)\\$UARM$!\\epoc32\\data\\z\\system\\apps\\PerlApp!i;
274 print PERLAPP_PKG <<__EOF__;
275 ; !!!!!! DO NOT EDIT THIS FILE !!!!!!
276 ; This file is built by symbian\\config.pl.
277 ; Any changes made here will be lost!
281 ; Note that the demo_pl needs to be run to create the demo .pl scripts.
286 ; Standard SIS file header
287 #{"PerlApp"},(0x102015F6),0,2,0
289 ; Supports Series 60 v0.9
290 (0x101F6F88), 0, 0, 0, {"Series60ProductID"}
293 "$UREL\\PerlApp.APP"-"!:\\system\\apps\\PerlApp\\PerlApp.app"
294 "$UREL\\PerlRecog.mdl"-"!:\\system\\recogs\\PerlRecog.mdl"
295 "$APPS\\PerlApp.rsc"-"!:\\system\\apps\\PerlApp\\PerlApp.rsc"
296 "$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"
298 if ( open( DEMOS, "perl symbian\\demo_pl list |" ) ) {
301 print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n];
308 die "$0: symbian\\PerlApp.pkg: $!\n";
310 push @unclean, 'symbian\PerlApp.pkg';
313 print "Creating...\n";
316 'miniperlmain.c', 'symbian\symbian_stubs.c',
317 'symbian\PerlBase.cpp',
318 'symbian\PerlUtil.cpp',
319 'symbian\symbian_utils.cpp',
323 'perlmain.c', 'symbian\symbian_stubs.c',
324 'symbian\symbian_utils.cpp', 'symbian\PerlBase.cpp',
325 'symbian\PerlUtil.cpp',
326 'ext\DynaLoader\DynaLoader.cpp',
330 "perl$VERSION", 'dll',
331 'symbian\symbian_dll.cpp', 'symbian\symbian_stubs.c',
332 'symbian\symbian_utils.cpp', 'symbian\PerlBase.cpp',
333 'symbian\PerlUtil.cpp',
334 'ext\DynaLoader\DynaLoader.cpp',
340 create_symbian_port_h();
341 create_DynaLoader_cpp();
342 create_PerlApp_pkg();
344 if ( open( PERLAPP_MMP, ">symbian/PerlApp.mmp" ) ) {
346 push @MACRO, '__SERIES60_1X__' if $S60SDK =~ /^1\./;
347 push @MACRO, '__SERIES60_2X__' if $S60SDK =~ /^2\./;
348 print PERLAPP_MMP <<__EOF__;
349 // !!!!!! DO NOT EDIT THIS FILE !!!!!!
350 // This file is built by symbian\\config.pl.
351 // Any changes made here will be lost!
354 UID 0x100039CE 0x102015F6
355 TARGETPATH \\system\\apps\\PerlApp
365 USERINCLUDE \\symbian\\perl\\$R_V_SV\\include
367 SYSTEMINCLUDE \\epoc32\\include
368 SYSTEMINCLUDE \\epoc32\\include\\libc
374 LIBRARY commondialogs.lib
380 LIBRARY perl$VERSION.lib
382 AIF PerlApp.aif . PerlAppAif.rss
385 for my $macro (@MACRO) {
386 print PERLAPP_MMP <<__EOF__;
392 push @unclean, 'symbian\PerlApp.mmp';
395 warn "$0: failed to create symbian\\PerlApp.mmp";
398 if ( open( MAKEFILE, ">Makefile" ) ) {
399 my $perl = "perl$VERSION";
400 my $windef1 = "$SDK\\Epoc32\\Build$CWD\\$perl\\$WIN\\$perl.def";
401 my $windef2 = "..\\BWINS\\${perl}u.def";
402 my $armdef1 = "$SDK\\Epoc32\\Build$CWD\\$perl\\$ARM\\$perl.def";
403 my $armdef2 = "..\\BMARM\\${perl}u.def";
404 print "\tMakefile\n";
405 print MAKEFILE <<__EOF__;
407 \@echo === Perl for Symbian ===
408 \@echo Useful targets:
409 \@echo all win arm clean
410 \@echo perldll.sis perlext.sis perlsdk.zip
417 build: rename_makedef build_win build_arm
419 @unclean: symbian\\config.pl
420 perl symbian\\config.pl
422 build_win: abld.bat win_perl.mf win_miniperl.mf win_${VERSION}.mf perldll_win
424 build_vc6: abld.bat win_perl.mf win_miniperl.mf win_${VERSION}.mf vc6.mf perldll_win
426 build_arm: abld.bat perl_arm miniperl_arm arm_${VERSION}.mf perldll_arm
428 miniperl_win: miniperl.mmp abld.bat win_miniperl.mf rename_makedef
429 abld build \$(WIN) udeb miniperl
431 miniperl_arm: miniperl.mmp abld.bat arm_miniperl.mf rename_makedef
432 abld build \$(ARM) $UARM miniperl
434 miniperl: miniperl_win miniperl_arm
436 perl: perl_win perl_arm
438 perl_win: perl.mmp abld.bat win_perl.mf rename_makedef
439 abld build \$(WIN) perl
441 perl_arm: perl.mmp abld.bat arm_perl.mf rename_makedef
442 abld build \$(ARM) $UARM perl
444 perldll_win: perl${VERSION}_win freeze_win perl${VERSION}_win
446 perl${VERSION}_win: perl$VERSION.mmp abld.bat rename_makedef
447 abld build \$(WIN) perl$VERSION
449 perldll_arm: perl${VERSION}_arm freeze_arm perl${VERSION}_arm
451 perl${VERSION}_arm: perl$VERSION.mmp arm_${VERSION}.mf abld.bat rename_makedef
452 abld build \$(ARM) $UARM perl$VERSION
454 perldll perl$VERSION: perldll_win perldll_arm
456 win: miniperl_win perl_win perldll_win
458 arm: miniperl_arm perl_arm perldll_arm
461 -ren makedef.pl nomakedef.pl
463 # Symbian SDK has a makedef.pl of its own,
464 # and we don't need Perl's.
466 -ren nomakedef.pl makedef.pl
468 abld.bat abld: bld.inf
471 makefiles: win.mf arm.mf vc6.mf
473 vc6: win.mf vc6.mf build_vc6
475 win_miniperl.mf: abld.bat symbian\\config.pl
476 abld makefile \$(WIN) miniperl
477 echo > win_miniperl.mf
479 win_perl.mf: abld.bat symbian\\config.pl
480 abld makefile \$(WIN) perl
483 win_${VERSION}.mf: abld.bat symbian\\config.pl
484 abld makefile \$(WIN) perl${VERSION}
485 echo > win_${VERSION}.mf
488 cd symbian; make win.mf
490 win.mf: win_miniperl.mf win_perl.mf win_${VERSION}.mf symbian\\win.mf
492 arm_miniperl.mf: abld.bat symbian\\config.pl
493 abld makefile \$(ARM) miniperl
494 echo > arm_miniperl.mf
496 arm_perl.mf: abld.bat symbian\\config.pl
497 abld makefile \$(ARM) perl
500 arm_${VERSION}.mf: abld.bat symbian\\config.pl
501 abld makefile \$(ARM) perl${VERSION}
502 echo > arm_${VERSION}.mf
504 arm.mf: arm_miniperl.mf arm_perl.mf arm_${VERSION}.mf
506 vc6.mf: abld.bat symbian\\config.pl
510 PM = lib\\Config.pm lib\\Cross.pm lib\\lib.pm ext\\DynaLoader\\DynaLoader.pm ext\\DynaLoader\\XSLoader.pm ext\\Errno\\Errno.pm
511 POD = lib\\Config.pod
515 XLIB = -Ixlib\\symbian
517 XSBOPT = --win=\$(WIN) --arm=\$(ARM)
520 copy symbian\\config.sh config.sh
521 perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g" config.sh
522 perl \$(XLIB) configpm --cross=symbian
523 copy xlib\\symbian\\Config.pm lib\\Config.pm
524 perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" lib\\Config.pm
525 perl -pi.bak -e "s:5\\.\\d+\\.\\d+:$R_V_SV:g" lib\\Config.pm
526 -perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" xlib\\symbian\\Config_heavy.pl
531 ext\\DynaLoader\\DynaLoader.pm:
532 -del /f ext\\DynaLoader\\DynaLoader.pm
533 perl -Ixlib\\symbian ext\\DynaLoader\\DynaLoader_pm.PL
534 perl -pi.bak -e "s/__END__//" DynaLoader.pm
535 copy /y DynaLoader.pm ext\\DynaLoader\\DynaLoader.pm
536 -del /f DynaLoader.pm DynaLoader.pm.bak
538 ext\\DynaLoader\\XSLoader.pm:
539 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) XSLoader
541 ext\\Errno\\Errno.pm:
542 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) Errno
544 miniperlexe.sis: miniperl_arm symbian\\makesis.pl
545 perl \$(XLIB) symbian\\makesis.pl miniperl
547 perlexe.sis: perl_arm symbian\\makesis.pl
548 perl \$(XLIB) symbian\\makesis.pl perl
551 allsis: all miniperlexe.sis perlexe.sis perldll.sis perllib.sis perlext.sis perlapp.sis
553 perldll.sis perl$VERSION.sis: perldll_arm pm symbian\\makesis.pl
554 perl \$(XLIB) symbian\\makesis.pl perl${VERSION}dll
556 perl${VERSION}lib.sis perllib.sis: \$(PM)
557 perl \$(XLIB) symbian\\makesis.pl perl${VERSION}lib
559 perl${VERSION}ext.sis perlext.sis: perldll_arm buildext_sis
560 perl symbian\\makesis.pl perl${VERSION}ext
562 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
564 buildext: perldll symbian\\xsbuild.pl lib\\Config.pm
565 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) \$(EXT)
567 buildext_sis: perldll.sis symbian\\xsbuild.pl lib\\Config.pm
568 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --sis \$(EXT)
570 cleanext: symbian\\xsbuild.pl
571 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT)
573 distcleanext: symbian\\xsbuild.pl
574 perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --distclean \$(EXT)
576 sis makesis: miniperl perl perldll pm buildext perlapp.sis
577 perl \$(XLIB) symbian\\makesis.pl
579 APIDIR = \\Symbian\\perl\\$R_V_SV
582 -mkdir \\Symbian\\perl
583 -mkdir \\Symbian\\perl\\$R_V_SV
584 -mkdir \$(APIDIR)\\include
585 -mkdir \$(APIDIR)\\include\\symbian
586 -mkdir \$(APIDIR)\\lib
587 -mkdir \$(APIDIR)\\lib\\ExtUtils
588 -mkdir \$(APIDIR)\\pod
589 -mkdir \$(APIDIR)\\bin
591 copy /y *.h \$(APIDIR)\\include
592 - copy /y *.inc \$(APIDIR)\\include
593 copy /y lib\\ExtUtils\\xsubpp \$(APIDIR)\\lib\\ExtUtils
594 copy /y lib\\ExtUtils\\typemap \$(APIDIR)\\lib\\ExtUtils
595 copy /y lib\\ExtUtils\\ParseXS.pm \$(APIDIR)\\lib\\ExtUtils
596 copy /y symbian\\xsbuild.pl \$(APIDIR)\\bin
597 copy /y symbian\\sisify.pl \$(APIDIR)\\bin
598 copy /y symbian\\PerlBase.h \$(APIDIR)\\include
599 copy /y symbian\\PerlUtil.h \$(APIDIR)\\include
600 copy /y symbian\\symbian*.h \$(APIDIR)\\include\\symbian
601 copy /y symbian\\PerlBase.pod \$(APIDIR)\\pod
602 copy /y symbian\\PerlUtil.pod \$(APIDIR)\\pod
604 RELDIR = $SDK\\epoc32\\release
605 RELWIN = \$(RELDIR)\\\$(WIN)\\udeb
606 RELARM = \$(RELDIR)\\\$(ARM)\\$UARM
607 SDKZIP = perl${VERSION}sdk.zip
610 \$(SDKZIP) perlsdk.zip: perldll sdkinstall
611 -del /f perl${VERSION}sdk.zip
612 zip -r perl${VERSION}sdk.zip \$(RELWIN)\\perl$VERSION.* \$(RELARM)\\perl$VERSION.* \$(APIDIR)
613 \@echo perl${VERSION}sdk.zip created.
615 PERLSIS = perl${VERSION}.SIS perl${VERSION}lib.SIS perl${VERSION}ext.SIS
616 ALLSIS = \$(PERLSIS) perlapp.sis
617 ETC = README.symbian symbian\\PerlBase.pod symbian\\PerlUtil.pod symbian\\sisify.pl symbian\\TODO
619 perl${VERSION}dist.zip perldist.zip: \$(ALLSIS) \$(SDKZIP) \$(ETC)
620 -del /f perl${VERSION}dist.zip
621 zip -r perl${VERSION}dist.zip \$(ALLSIS) \$(SDKZIP) \$(ETC)
623 perlapp: sdkinstall perlapp_win perlapp_arm
625 perlapp_win: config.h
626 cd symbian; make perlapp_win
628 perlapp_arm: config.h
629 cd symbian; make perlapp_arm
631 perlapp_demo_extract:
632 cd symbian; make perlapp_demo_extract
634 perlapp.sis: perlapp_arm
635 cd symbian; make perlapp.sis
638 cd symbian; zip perlapp.zip PerlApp.* PerlRecog.* PerlBase.* PerlUtil.* demo_pl
640 zip: perlsdk.zip perlapp.zip
642 freeze: freeze_win freeze_arm
645 abld freeze \$(WIN) perl$VERSION
648 abld freeze \$(ARM) perl$VERSION
650 defrost: defrost_win defrost_arm
666 clean: clean_win clean_arm rerename_makedef
669 -del /f lib\\Config.pm.bak
670 -del /f xlib\\symbian\\Config_heavy.pl
673 -del /f DynaLoader.pm ext\\DynaLoader\\DynaLoader.pm
674 -del /f ext\\DynaLoader\\Makefile
675 -del /f ext\\SDBM_File\\sdbm\\Makefile
676 -del /f symbian\\*.lst
677 -del /f abld.bat @unclean *.pkg *.sis *.zip
678 -del /f symbian\\abld.bat symbian\\*.sis symbian\\*.zip
679 -del /f symbian\\perl5*.pkg symbian\\miniperl.pkg
680 -del arm_*.mf win_*.mf vc6*.mf
681 -perl symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT)
682 -rmdir /s /q perl${VERSION}_Data
683 -cd symbian; make clean
685 reallyclean: abld.bat
688 distclean: defrost reallyclean clean
689 -perl symbian\\xsbuild.pl \$(XSBOPT) --distclean \$(EXT)
690 -del /f config.h config.sh.bak symbian\\symbian_port.h
691 -del /f Makefile symbian\\PerlApp.mmp
693 -del /f *.cwlink *.resources *.pref
694 -del /f perl${VERSION}.xml perl${VERSION}.mcp uid.cpp
696 cd symbian; make distclean
697 -del /f symbian\\Makefile
702 warn "$0: failed to create Makefile: $!\n";
705 if ( open( MAKEFILE, ">symbian/Makefile")) {
706 my $wrap = $S60SDK eq '1.2' && $SDK !~ /_CW$/;
707 my $ABLD = $wrap ? 'perl b.pl': 'abld';
708 print "\tsymbian/Makefile\n";
709 print MAKEFILE <<__EOF__;
717 perlapp_win: abld.bat ..\\config.h PerlApp.h PerlApp.cpp
719 \$(ABLD) build \$(WIN) udeb
721 perlapp_arm: ..\\config.h PerlApp.h PerlApp.cpp
723 \$(ABLD) build \$(ARM) $UARM
729 perlapp_demo_extract:
732 perlapp.sis: perlapp_arm perlapp_demo_extract
735 copy /y perlapp.SIS ..\\perlapp.SIS
738 -perl demo_pl cleanup
743 -del /f *.cwlink *.resources *.pref
744 -del /f PerlApp.xml PerlApp.mcp uid.cpp
745 -rmdir /s /q PerlApp_Data
750 if ( open( B_PL, ">symbian/b.pl")) {
751 print B_PL <<'__EOF__';
754 # nmake doesn't like MFLAGS and MAKEFLAGS being set to -w and w.
756 delete $ENV{MAKEFLAGS};
758 system("abld @ARGV");
762 warn "$0: failed to create symbian/b.pl: $!\n";
766 warn "$0: failed to create symbian/Makefile: $!\n";
769 print "Deleting...\n";
771 # Do not delete config.h here.
774 "xlib\\symbian\\Config.pm",
775 "xlib\\symbian\\Config_heavy.pl",