Commit | Line | Data |
27da23d5 |
1 | #!/usr/bin/perl -w |
2 | |
3 | # Copyright (c) 2004-2005 Nokia. All rights reserved. |
a0fd4948 |
4 | # This utility is licensed under the same terms as Perl itself. |
27da23d5 |
5 | |
6 | use strict; |
7 | use lib "symbian"; |
8 | |
9 | print "Configuring...\n"; |
10 | print "Configuring with: Perl version $] ($^X)\n"; |
11 | |
12 | do "sanity.pl"; |
13 | |
14 | my %VERSION = %{ do "version.pl" }; |
15 | |
16 | printf "Configuring for: Perl version $VERSION{REVISION}.%03d%03d\n", |
17 | $VERSION{VERSION}, $VERSION{SUBVERSION}; |
18 | |
19 | my $VERSION = "$VERSION{REVISION}$VERSION{VERSION}$VERSION{SUBVERSION}"; |
20 | my $R_V_SV = "$VERSION{REVISION}.$VERSION{VERSION}.$VERSION{SUBVERSION}"; |
21 | |
ed76c0e4 |
22 | my ($SYMBIAN_ROOT, $SYMBIAN_VERSION, $SDK_NAME, $SDK_VARIANT, $SDK_VERSION) = |
23 | @{ do "sdk.pl" }; |
27da23d5 |
24 | my %PORT = %{ do "port.pl" }; |
25 | |
ed76c0e4 |
26 | if ($SYMBIAN_ROOT eq 'C:\Symbian\Series60_1_2_CW') { |
27da23d5 |
27 | ( $SYMBIAN_VERSION, $SDK_VERSION ) = qw(6.1 1.2); |
28 | } |
29 | |
30 | my $WIN = $ENV{WIN} ; # 'wins', 'winscw' (from sdk.pl) |
ed76c0e4 |
31 | my $ARM = 'thumb'; # 'thumb', 'armv5' |
27da23d5 |
32 | my $S60SDK = $ENV{S60SDK}; # qw(1.2 2.0 2.1 2.6) (from sdk.pl) |
ed76c0e4 |
33 | my $S80SDK = $ENV{S80SDK}; # qw(2.0) (from sdk.pl) |
25ca88e0 |
34 | my $UIQSDK = $ENV{UIQSDK}; # qw(2.0 2.1) (from sdk.pl) |
27da23d5 |
35 | |
36 | my $UREL = $ENV{UREL}; # from sdk.pl |
37 | $UREL =~ s/-ARM-/$ARM/; |
38 | my $UARM = $ENV{UARM}; # from sdk.pl |
39 | |
40 | die "$0: SDK not recognized\n" |
ed76c0e4 |
41 | if !defined($SYMBIAN_VERSION) || |
42 | !defined($SDK_VERSION) || |
25ca88e0 |
43 | (!defined($S60SDK) && !defined($S80SDK) && !defined($UIQSDK)); |
27da23d5 |
44 | |
45 | die "$0: does not know which Windows compiler to use\n" |
46 | unless defined $WIN; |
47 | |
ed76c0e4 |
48 | print "Symbian $SYMBIAN_VERSION SDK $SDK_VARIANT $SDK_VERSION ($WIN) installed at $SYMBIAN_ROOT\n"; |
27da23d5 |
49 | |
50 | my $CWD = do "cwd.pl"; |
51 | print "Build directory $CWD\n"; |
52 | |
ed76c0e4 |
53 | die "$0: '+' in cwd does not work with Series 60 SDK 1.2\n" |
54 | if defined $S60SDK && $S60SDK eq '1.2' && $CWD =~ /\+/; |
27da23d5 |
55 | |
56 | my @unclean; |
57 | my @mmp; |
58 | |
59 | sub create_mmp { |
60 | my ( $target, $type, @x ) = @_; |
61 | my $miniperl = $target eq 'miniperl'; |
62 | my $perl = $target eq 'perl'; |
63 | my $mmp = "$target.mmp"; |
64 | my $targetpath = $miniperl |
65 | || $perl ? "TARGETPATH\t\\System\\Apps\\Perl" : ""; |
66 | if ( open( my $fh, ">$mmp" ) ) { |
67 | print "\t$mmp\n"; |
68 | push @mmp, $mmp; |
69 | push @unclean, $mmp; |
70 | print $fh <<__EOF__; |
71 | TARGET $target.$type |
72 | TARGETTYPE $type |
73 | $targetpath |
74 | EPOCHEAPSIZE 1024 8388608 |
75 | EPOCSTACKSIZE 65536 |
76 | EXPORTUNFROZEN |
77 | SRCDBG |
78 | __EOF__ |
ed76c0e4 |
79 | if ($SDK_VARIANT eq 'S60') { |
80 | print $fh "MACRO\t__SERIES60__\n"; |
81 | print $fh "MACRO\t__SERIES60_1X__\n" if $S60SDK =~ /^1\./; |
82 | print $fh "MACRO\t__SERIES60_2X__\n" if $S60SDK =~ /^2\./; |
83 | } |
84 | if ($SDK_VARIANT eq 'S80') { |
85 | print $fh "MACRO\t__SERIES80__\n"; |
86 | print $fh "MACRO\t__SERIES80_1X__\n" if $S80SDK =~ /^1\./; |
87 | print $fh "MACRO\t__SERIES80_2X__\n" if $S80SDK =~ /^2\./; |
88 | } |
25ca88e0 |
89 | if ($SDK_VARIANT eq 'UIQ') { |
90 | print $fh "MACRO\t__UIQ__\n"; |
91 | print $fh "MACRO\t__UIQ_1X__\n" if $UIQSDK =~ /^1\./; |
92 | print $fh "MACRO\t__UIQ_2X__\n" if $UIQSDK =~ /^2\./; |
93 | } |
27da23d5 |
94 | my ( @c, %c ); |
95 | @c = map { glob } qw(*.c); # Find the .c files. |
96 | @c = map { lc } @c; # Lowercase the names. |
97 | @c = grep { !/malloc\.c/ } @c; # Use the system malloc. |
98 | @c = grep { !/main\.c/ } @c; # main.c must be explicit. |
99 | push @c, map { lc } @x; |
100 | @c = map { s:^\.\./::; $_ } @c; # Remove the leading ../ |
101 | @c = map { $c{$_}++ } @c; # Uniquefy. |
102 | @c = sort keys %c; # Beautify. |
103 | |
104 | for (@c) { |
105 | print $fh "SOURCE\t\t$_\n"; |
106 | } |
107 | print $fh <<__EOF__; |
108 | SOURCEPATH $CWD |
109 | USERINCLUDE $CWD |
110 | USERINCLUDE $CWD\\ext\\DynaLoader |
111 | USERINCLUDE $CWD\\symbian |
112 | SYSTEMINCLUDE \\epoc32\\include\\libc |
113 | SYSTEMINCLUDE \\epoc32\\include |
114 | LIBRARY euser.lib |
115 | LIBRARY estlib.lib |
d0d72822 |
116 | LIBRARY eikcore.lib |
117 | LIBRARY cone.lib |
118 | LIBRARY efsrv.lib |
27da23d5 |
119 | __EOF__ |
120 | if ( $miniperl || $perl || $type eq 'dll' ) { |
121 | print $fh <<__EOF__; |
122 | LIBRARY charconv.lib |
27da23d5 |
123 | LIBRARY hal.lib |
124 | LIBRARY estor.lib |
125 | __EOF__ |
126 | } |
25ca88e0 |
127 | if ($SDK_VARIANT =~ /^S[68]0$/) { |
128 | print $fh <<__EOF__; |
129 | LIBRARY commonengine.lib |
130 | __EOF__ |
131 | } |
d0d72822 |
132 | if (defined $S60SDK) { |
133 | print $fh <<__EOF__; |
134 | LIBRARY avkon.lib |
135 | LIBRARY commondialogs.lib |
136 | __EOF__ |
137 | } |
138 | if (defined $S80SDK) { |
139 | print $fh <<__EOF__; |
140 | LIBRARY eikctl.lib |
141 | LIBRARY eikcoctl.lib |
142 | LIBRARY eikdlg.lib |
143 | LIBRARY ckndlg.lib |
144 | __EOF__ |
145 | } |
146 | if (defined $UIQSDK) { |
147 | print $fh <<__EOF__; |
148 | LIBRARY eikctl.lib |
149 | LIBRARY eikcoctl.lib |
150 | LIBRARY eikdlg.lib |
151 | LIBRARY qikctl.lib |
152 | __EOF__ |
153 | } |
27da23d5 |
154 | if ( $type eq 'exe' ) { |
155 | print $fh <<__EOF__; |
156 | STATICLIBRARY ecrt0.lib |
157 | __EOF__ |
158 | } |
159 | if ($miniperl) { |
160 | print $fh <<__EOF__; |
161 | MACRO PERL_MINIPERL |
162 | __EOF__ |
163 | } |
164 | if ($perl) { |
165 | print $fh <<__EOF__; |
166 | MACRO PERL_PERL |
167 | __EOF__ |
168 | } |
169 | print $fh <<__EOF__; |
170 | MACRO PERL_CORE |
171 | MACRO MULTIPLICITY |
172 | MACRO PERL_IMPLICIT_CONTEXT |
173 | __EOF__ |
174 | unless ( $miniperl || $perl ) { |
175 | print $fh <<__EOF__; |
176 | MACRO PERL_GLOBAL_STRUCT |
177 | MACRO PERL_GLOBAL_STRUCT_PRIVATE |
d0d72822 |
178 | RESOURCE symbian\\PerlUi.rss |
27da23d5 |
179 | __EOF__ |
180 | } |
181 | close $fh; |
182 | } |
183 | else { |
184 | warn "$0: failed to open $mmp for writing: $!\n"; |
185 | } |
186 | } |
187 | |
188 | sub create_bld_inf { |
189 | if ( open( BLD_INF, ">bld.inf" ) ) { |
190 | print "\tbld.inf\n"; |
191 | push @unclean, "bld.inf"; |
192 | print BLD_INF <<__EOF__; |
193 | PRJ_PLATFORMS |
194 | ${WIN} ${ARM} |
195 | PRJ_MMPFILES |
196 | __EOF__ |
197 | for (@mmp) { print BLD_INF $_, "\n" } |
198 | close BLD_INF; |
199 | } |
200 | else { |
201 | warn "$0: failed to open bld.inf for writing: $!\n"; |
202 | } |
203 | } |
204 | |
205 | my %config; |
206 | |
207 | sub load_config_sh { |
208 | if ( open( CONFIG_SH, "symbian/config.sh" ) ) { |
209 | while (<CONFIG_SH>) { |
210 | if (/^(\w+)=['"]?(.*?)["']?$/) { |
211 | my ( $var, $val ) = ( $1, $2 ); |
212 | $val =~ s/x.y.z/$R_V_SV/gi; |
213 | $val =~ s/thumb/$ARM/gi; |
214 | $val = "'$SYMBIAN_VERSION'" if $var eq 'osvers'; |
215 | $val = "'$SDK_VERSION'" if $var eq 'sdkvers'; |
216 | $config{$var} = $val; |
217 | } |
218 | } |
219 | close CONFIG_SH; |
220 | } |
221 | else { |
222 | warn "$0: failed to open symbian\\config.sh for reading: $!\n"; |
223 | } |
224 | } |
225 | |
226 | sub create_config_h { |
227 | load_config_sh(); |
228 | if ( open( CONFIG_H, ">config.h" ) ) { |
229 | print "\tconfig.h\n"; |
230 | push @unclean, "config.h"; |
231 | if ( open( CONFIG_H_SH, "config_h.SH" ) ) { |
232 | while (<CONFIG_H_SH>) { |
233 | last if /\#ifndef _config_h_/; |
234 | } |
235 | print CONFIG_H <<__EOF__; |
236 | /* |
237 | * Package name : perl |
238 | * Source directory : . |
239 | * Configuration time: |
240 | * Configured by : |
241 | * Target system : symbian |
242 | */ |
243 | |
244 | #ifndef _config_h_ |
245 | __EOF__ |
246 | while (<CONFIG_H_SH>) { |
247 | last if /!GROK!THIS/; |
d0d72822 |
248 | s/\$(\w+)/exists $config{$1} ? $config{$1} : (warn "$0: config.sh missing '$1'\n", "")/eg; |
27da23d5 |
249 | s/^#undef\s+(\S+).+/#undef $1/g; |
250 | s:\Q/**/::; |
251 | print CONFIG_H; |
252 | } |
253 | close CONFIG_H_SH; |
254 | } |
255 | else { |
256 | warn "$0: failed to open ../config_h.SH for reading: $!\n"; |
257 | } |
258 | close CONFIG_H; |
259 | } |
260 | else { |
261 | warn "$0: failed to open config.h for writing: $!\n"; |
262 | } |
263 | } |
264 | |
265 | sub create_DynaLoader_cpp { |
266 | print "\text\\DynaLoader\\DynaLoader.cpp\n"; |
267 | system( |
268 | q[perl -Ilib lib\ExtUtils\xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp] |
269 | ) == 0 |
270 | or die "$0: creating DynaLoader.cpp failed: $!\n"; |
271 | push @unclean, 'ext\DynaLoader\DynaLoader.cpp'; |
272 | |
273 | } |
274 | |
275 | sub create_symbian_port_h { |
276 | print "\tsymbian\\symbian_port.h\n"; |
277 | if ( open( SYMBIAN_PORT_H, ">symbian/symbian_port.h" ) ) { |
ed76c0e4 |
278 | my ($sdkmajor, $sdkminor); |
279 | if ($SDK_VARIANT eq 'S60') { |
280 | $S60SDK =~ /^(\d+)\.(\d+)$/; |
281 | ($sdkmajor, $sdkminor) = ($1, $2); |
282 | } |
283 | if ($SDK_VARIANT eq 'S80') { |
284 | $S80SDK =~ /^(\d+)\.(\d+)$/; |
285 | ($sdkmajor, $sdkminor) = ($1, $2); |
286 | } |
25ca88e0 |
287 | if ($SDK_VARIANT eq 'UIQ') { |
288 | $UIQSDK =~ /^(\d+)\.(\d+)$/; |
289 | ($sdkmajor, $sdkminor) = ($1, $2); |
290 | } |
27da23d5 |
291 | print SYMBIAN_PORT_H <<__EOF__; |
292 | /* Copyright (c) 2004-2005, Nokia. All rights reserved. */ |
293 | |
294 | #ifndef __symbian_port_h__ |
295 | #define __symbian_port_h__ |
296 | |
297 | #define PERL_SYMBIANPORT_MAJOR $PORT{dll}->{MAJOR} |
298 | #define PERL_SYMBIANPORT_MINOR $PORT{dll}->{MINOR} |
299 | #define PERL_SYMBIANPORT_PATCH $PORT{dll}->{PATCH} |
300 | |
ed76c0e4 |
301 | #define PERL_SYMBIANSDK_FLAVOR L"$SDK_VARIANT" |
27da23d5 |
302 | #define PERL_SYMBIANSDK_MAJOR $sdkmajor |
303 | #define PERL_SYMBIANSDK_MINOR $sdkminor |
304 | |
305 | #endif /* #ifndef __symbian_port_h__ */ |
306 | __EOF__ |
307 | close(SYMBIAN_PORT_H); |
308 | push @unclean, 'symbian\symbian_port.h'; |
309 | } |
310 | else { |
311 | warn "$0: failed to open symbian/symbian_port.h for writing: $!\n"; |
312 | } |
313 | } |
314 | |
315 | sub create_perlmain_c { |
316 | print "\tperlmain.c\n"; |
317 | system( |
318 | 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] |
319 | ) == 0 |
320 | or die "$0: Creating perlmain.c failed: $!\n"; |
321 | push @unclean, 'perlmain.c'; |
322 | } |
323 | |
324 | sub create_PerlApp_pkg { |
325 | print "\tsymbian\\PerlApp.pkg\n"; |
326 | if ( open( PERLAPP_PKG, ">symbian\\PerlApp.pkg" ) ) { |
ed76c0e4 |
327 | my $ProductId = |
328 | defined $S60SDK ? |
329 | qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] : |
330 | defined $S80SDK ? |
331 | qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] : |
25ca88e0 |
332 | defined $UIQSDK && $SDK_VERSION =~ /^(\d)\.(\d)$/ ? |
333 | qq[;Supports UIQ v2.1\n(0x101F617B), $1, $2, 0, {"UIQ21ProductID"}\n] : |
ed76c0e4 |
334 | ";Supports Series NN"; |
27da23d5 |
335 | my $APPS = $UREL; |
ed76c0e4 |
336 | if (($SDK_VARIANT eq 'S60' && $SDK_VERSION ne '1.2' || $WIN eq 'winscw') || defined $S80SDK) { # Do only if not in S60 1.2 VC. |
27da23d5 |
337 | $APPS =~ s!\\epoc32\\release\\(.+)\\$UARM$!\\epoc32\\data\\z\\system\\apps\\PerlApp!i; |
338 | } |
db5886f1 |
339 | # TODO: in S60 3.0 there will be no more recognizers. |
ed76c0e4 |
340 | my $mdl = qq["$UREL\\PerlRecog.mdl"-"!:\\system\\recogs\\PerlRecog.mdl";]; |
db5886f1 |
341 | my $AIF = $SDK_VARIANT =~ /^S[68]0/ ? qq["$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"] : ""; |
27da23d5 |
342 | print PERLAPP_PKG <<__EOF__; |
343 | ; !!!!!! DO NOT EDIT THIS FILE !!!!!! |
344 | ; This file is built by symbian\\config.pl. |
345 | ; Any changes made here will be lost! |
346 | ; |
347 | ; PerlApp.pkg |
348 | ; |
349 | ; Note that the demo_pl needs to be run to create the demo .pl scripts. |
350 | ; |
351 | ; Languages |
352 | &EN; |
353 | |
354 | ; Standard SIS file header |
f26f4a2f |
355 | #{"PerlApp"},(0x102015F6),0,2,0 |
27da23d5 |
356 | |
ed76c0e4 |
357 | $ProductId |
27da23d5 |
358 | |
359 | ; Files |
360 | "$UREL\\PerlApp.APP"-"!:\\system\\apps\\PerlApp\\PerlApp.app" |
ed76c0e4 |
361 | $mdl |
27da23d5 |
362 | "$APPS\\PerlApp.rsc"-"!:\\system\\apps\\PerlApp\\PerlApp.rsc" |
db5886f1 |
363 | $AIF |
27da23d5 |
364 | __EOF__ |
365 | if ( open( DEMOS, "perl symbian\\demo_pl list |" ) ) { |
366 | while (<DEMOS>) { |
367 | chomp; |
368 | print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n]; |
369 | } |
370 | close(DEMOS); |
371 | } |
372 | close(PERLAPP_PKG); |
373 | } |
374 | else { |
375 | die "$0: symbian\\PerlApp.pkg: $!\n"; |
376 | } |
377 | push @unclean, 'symbian\PerlApp.pkg'; |
378 | } |
379 | |
380 | print "Creating...\n"; |
381 | create_mmp( |
382 | 'miniperl', 'exe', |
383 | 'miniperlmain.c', 'symbian\symbian_stubs.c', |
c8f896e5 |
384 | 'symbian\PerlBase.cpp', |
d0d72822 |
385 | 'symbian\PerlUi.cpp', |
c8f896e5 |
386 | 'symbian\PerlUtil.cpp', |
387 | 'symbian\symbian_utils.cpp', |
27da23d5 |
388 | ); |
389 | create_mmp( |
390 | "perl", 'exe', |
391 | 'perlmain.c', 'symbian\symbian_stubs.c', |
d0d72822 |
392 | 'symbian\symbian_utils.cpp', |
393 | 'symbian\PerlBase.cpp', |
394 | 'symbian\PerlUi.cpp', |
c8f896e5 |
395 | 'symbian\PerlUtil.cpp', |
27da23d5 |
396 | 'ext\DynaLoader\DynaLoader.cpp', |
397 | ); |
398 | |
399 | create_mmp( |
400 | "perl$VERSION", 'dll', |
401 | 'symbian\symbian_dll.cpp', 'symbian\symbian_stubs.c', |
d0d72822 |
402 | 'symbian\symbian_utils.cpp', |
403 | 'symbian\PerlBase.cpp', |
404 | 'symbian\PerlUi.cpp', |
c8f896e5 |
405 | 'symbian\PerlUtil.cpp', |
27da23d5 |
406 | 'ext\DynaLoader\DynaLoader.cpp', |
407 | ); |
408 | |
409 | create_bld_inf(); |
410 | create_config_h(); |
411 | create_perlmain_c(); |
412 | create_symbian_port_h(); |
413 | create_DynaLoader_cpp(); |
414 | create_PerlApp_pkg(); |
415 | |
416 | if ( open( PERLAPP_MMP, ">symbian/PerlApp.mmp" ) ) { |
417 | my @MACRO; |
ed76c0e4 |
418 | my @LIB; |
d0d72822 |
419 | push @MACRO, 'PERL_IMPLICIT_CONTEXT'; |
420 | push @MACRO, 'MULTIPLICITY'; |
ed76c0e4 |
421 | if (defined $S60SDK) { |
422 | push @MACRO, '__SERIES60__'; |
423 | push @MACRO, '__SERIES60_1X__' if $S60SDK =~ /^1\./; |
424 | push @MACRO, '__SERIES60_2X__' if $S60SDK =~ /^2\./; |
425 | push @LIB, <<__EOF__; |
426 | LIBRARY avkon.lib |
427 | LIBRARY commondialogs.lib |
428 | __EOF__ |
429 | } |
430 | if (defined $S80SDK) { |
431 | push @MACRO, '__SERIES80__'; |
432 | push @MACRO, '__SERIES80_1X__' if $S80SDK =~ /^1\./; |
433 | push @MACRO, '__SERIES80_2X__' if $S80SDK =~ /^2\./; |
434 | push @LIB, <<__EOF__; |
435 | LIBRARY eikctl.lib |
436 | LIBRARY eikcoctl.lib |
c7a4d1c0 |
437 | LIBRARY eikdlg.lib |
ed76c0e4 |
438 | LIBRARY ckndlg.lib |
439 | __EOF__ |
440 | } |
25ca88e0 |
441 | if (defined $UIQSDK) { |
442 | push @MACRO, '__UIQ__'; |
443 | push @MACRO, '__UIQ_1X__' if $UIQSDK =~ /^1\./; |
444 | push @MACRO, '__UIQ_2X__' if $UIQSDK =~ /^2\./; |
445 | push @LIB, <<__EOF__; |
446 | LIBRARY eikctl.lib |
447 | LIBRARY eikcoctl.lib |
448 | LIBRARY eikdlg.lib |
449 | LIBRARY qikctl.lib |
450 | __EOF__ |
451 | } |
27da23d5 |
452 | print PERLAPP_MMP <<__EOF__; |
453 | // !!!!!! DO NOT EDIT THIS FILE !!!!!! |
454 | // This file is built by symbian\\config.pl. |
455 | // Any changes made here will be lost! |
456 | TARGET PerlApp.app |
457 | TARGETTYPE app |
458 | UID 0x100039CE 0x102015F6 |
459 | TARGETPATH \\system\\apps\\PerlApp |
460 | SRCDBG |
461 | EXPORTUNFROZEN |
462 | SOURCEPATH . |
463 | SOURCE PerlApp.cpp |
464 | |
27da23d5 |
465 | USERINCLUDE . |
466 | USERINCLUDE .. |
467 | USERINCLUDE \\symbian\\perl\\$R_V_SV\\include |
468 | |
469 | SYSTEMINCLUDE \\epoc32\\include |
470 | SYSTEMINCLUDE \\epoc32\\include\\libc |
471 | |
472 | LIBRARY apparc.lib |
27da23d5 |
473 | LIBRARY bafl.lib |
474 | LIBRARY charconv.lib |
d0d72822 |
475 | LIBRARY cone.lib |
27da23d5 |
476 | LIBRARY efsrv.lib |
d0d72822 |
477 | LIBRARY eikcore.lib |
27da23d5 |
478 | LIBRARY estlib.lib |
479 | LIBRARY euser.lib |
480 | LIBRARY perl$VERSION.lib |
ed76c0e4 |
481 | @LIB |
d0d72822 |
482 | RESOURCE perlapp.rss |
27da23d5 |
483 | __EOF__ |
484 | if (@MACRO) { |
485 | for my $macro (@MACRO) { |
486 | print PERLAPP_MMP <<__EOF__; |
487 | MACRO $macro |
488 | __EOF__ |
489 | } |
490 | } |
25ca88e0 |
491 | if ($SDK_VARIANT =~ /^S[68]0$/) { |
492 | print PERLAPP_MMP <<__EOF__; |
493 | AIF PerlApp.aif . PerlAppAif.rss |
494 | __EOF__ |
495 | } |
27da23d5 |
496 | close(PERLAPP_MMP); |
497 | push @unclean, 'symbian\PerlApp.mmp'; |
498 | } |
499 | else { |
500 | warn "$0: failed to create symbian\\PerlApp.mmp"; |
501 | } |
502 | |
503 | if ( open( MAKEFILE, ">Makefile" ) ) { |
504 | my $perl = "perl$VERSION"; |
ed76c0e4 |
505 | my $windef1 = "$SYMBIAN_ROOT\\Epoc32\\Build$CWD\\$perl\\$WIN\\$perl.def"; |
27da23d5 |
506 | my $windef2 = "..\\BWINS\\${perl}u.def"; |
ed76c0e4 |
507 | my $armdef1 = "$SYMBIAN_ROOT\\Epoc32\\Build$CWD\\$perl\\$ARM\\$perl.def"; |
27da23d5 |
508 | my $armdef2 = "..\\BMARM\\${perl}u.def"; |
d0d72822 |
509 | my $MF = $WIN eq 'wins' ? 'vc6' : $WIN eq 'winscw' ? 'cw_ide' : "UNKNOWN"; |
27da23d5 |
510 | print "\tMakefile\n"; |
511 | print MAKEFILE <<__EOF__; |
512 | help: |
513 | \@echo === Perl for Symbian === |
514 | \@echo Useful targets: |
515 | \@echo all win arm clean |
516 | \@echo perldll.sis perlext.sis perlsdk.zip |
517 | |
518 | WIN = ${WIN} |
519 | ARM = ${ARM} |
520 | |
521 | all: build |
522 | |
ed76c0e4 |
523 | build: rename_makedef build_${WIN} build_arm |
27da23d5 |
524 | |
525 | @unclean: symbian\\config.pl |
526 | perl symbian\\config.pl |
527 | |
d0d72822 |
528 | build_${WIN}: abld.bat perldll_${WIN} |
ed76c0e4 |
529 | |
d0d72822 |
530 | build_vc6: abld.bat perldll_wins |
27da23d5 |
531 | |
d0d72822 |
532 | build_vc7: abld.bat perldll_wins |
c7a4d1c0 |
533 | |
d0d72822 |
534 | build_cw: abld.bat perldll_winscw |
27da23d5 |
535 | |
d0d72822 |
536 | build_arm: abld.bat perl_arm miniperl_arm perldll_arm |
27da23d5 |
537 | |
d0d72822 |
538 | miniperl_win miniperl_${WIN}: miniperl.mmp abld.bat rename_makedef |
ed76c0e4 |
539 | abld build ${WIN} udeb miniperl |
27da23d5 |
540 | |
d0d72822 |
541 | miniperl_arm: miniperl.mmp abld.bat rename_makedef |
27da23d5 |
542 | abld build \$(ARM) $UARM miniperl |
543 | |
ed76c0e4 |
544 | miniperl: miniperl_${WIN} miniperl_arm |
27da23d5 |
545 | |
ed76c0e4 |
546 | perl: perl_${WIN} perl_arm |
27da23d5 |
547 | |
d0d72822 |
548 | perl_win perl_${WIN}: perl.mmp abld.bat rename_makedef |
ed76c0e4 |
549 | abld build ${WIN} perl |
27da23d5 |
550 | |
d0d72822 |
551 | perl_arm: perl.mmp abld.bat rename_makedef |
27da23d5 |
552 | abld build \$(ARM) $UARM perl |
553 | |
ed76c0e4 |
554 | perldll_win perldll_${WIN}: perl${VERSION}_${WIN} freeze_${WIN} perl${VERSION}_${WIN} |
27da23d5 |
555 | |
ed76c0e4 |
556 | perl${VERSION}_win perl${VERSION}_${WIN}: perl$VERSION.mmp abld.bat rename_makedef |
557 | abld build ${WIN} perl$VERSION |
27da23d5 |
558 | |
559 | perldll_arm: perl${VERSION}_arm freeze_arm perl${VERSION}_arm |
560 | |
d0d72822 |
561 | perl${VERSION}_arm: perl$VERSION.mmp abld.bat rename_makedef |
27da23d5 |
562 | abld build \$(ARM) $UARM perl$VERSION |
563 | |
ed76c0e4 |
564 | perldll perl$VERSION: perldll_${WIN} perldll_arm |
27da23d5 |
565 | |
ed76c0e4 |
566 | win ${WIN}: miniperl_${WIN} perl_${WIN} perldll_${WIN} |
27da23d5 |
567 | |
ed76c0e4 |
568 | thumb arm: miniperl_arm perl_arm perldll_arm |
27da23d5 |
569 | |
570 | rename_makedef: |
571 | -ren makedef.pl nomakedef.pl |
572 | |
573 | # Symbian SDK has a makedef.pl of its own, |
574 | # and we don't need Perl's. |
575 | rerename_makedef: |
576 | -ren nomakedef.pl makedef.pl |
577 | |
d0d72822 |
578 | symbian\\PerlUi.rss: symbian\\PerlUi$SDK_VARIANT.rss |
579 | copy symbian\\PerlUi$SDK_VARIANT.rss symbian\\PerlUi.rss |
27da23d5 |
580 | |
d0d72822 |
581 | abld.bat abld: bld.inf symbian\\PerlUi.rss |
582 | bldmake bldfiles |
27da23d5 |
583 | |
584 | vc6: win.mf vc6.mf build_vc6 |
585 | |
c7a4d1c0 |
586 | vc7: win.mf vc7.mf build_vc7 |
587 | |
ed76c0e4 |
588 | cw: win.mf cw.mf build_cw |
27da23d5 |
589 | |
ed76c0e4 |
590 | ${WIN}_miniperl.mf: abld.bat symbian\\config.pl |
d0d72822 |
591 | abld makefile ${MF} miniperl |
ed76c0e4 |
592 | echo > ${WIN}_miniperl.mf |
27da23d5 |
593 | |
ed76c0e4 |
594 | ${WIN}_perl.mf: abld.bat symbian\\config.pl |
d0d72822 |
595 | abld makefile ${MF} perl |
ed76c0e4 |
596 | echo > ${WIN}_perl.mf |
27da23d5 |
597 | |
ed76c0e4 |
598 | ${WIN}_${VERSION}.mf: abld.bat symbian\\config.pl |
d0d72822 |
599 | abld makefile ${MF} perl${VERSION} |
ed76c0e4 |
600 | echo > ${WIN}_${VERSION}.mf |
27da23d5 |
601 | |
ed76c0e4 |
602 | symbian\\${WIN}.mf: |
603 | cd symbian; make ${WIN}.mf |
604 | |
605 | ${WIN}.mf: ${WIN}_miniperl.mf ${WIN}_perl.mf ${WIN}_${VERSION}.mf symbian\\${WIN}.mf |
27da23d5 |
606 | |
607 | arm_miniperl.mf: abld.bat symbian\\config.pl |
27da23d5 |
608 | echo > arm_miniperl.mf |
609 | |
610 | arm_perl.mf: abld.bat symbian\\config.pl |
27da23d5 |
611 | echo > arm_perl.mf |
612 | |
613 | arm_${VERSION}.mf: abld.bat symbian\\config.pl |
27da23d5 |
614 | echo > arm_${VERSION}.mf |
615 | |
616 | arm.mf: arm_miniperl.mf arm_perl.mf arm_${VERSION}.mf |
617 | |
ed76c0e4 |
618 | win.mf: vc6.mf cw.mf |
619 | echo > win.mf |
620 | |
27da23d5 |
621 | vc6.mf: abld.bat symbian\\config.pl |
622 | abld makefile vc6 |
623 | echo > vc6.mf |
624 | |
c7a4d1c0 |
625 | vc7.mf: abld.bat symbian\\config.pl |
626 | abld makefile vc7 |
627 | echo > vc7.mf |
628 | |
ed76c0e4 |
629 | cw.mf: abld.bat symbian\\config.pl |
630 | abld makefile cw_ide |
631 | echo > cw.mf |
632 | |
27da23d5 |
633 | PM = lib\\Config.pm lib\\Cross.pm lib\\lib.pm ext\\DynaLoader\\DynaLoader.pm ext\\DynaLoader\\XSLoader.pm ext\\Errno\\Errno.pm |
634 | POD = lib\\Config.pod |
635 | |
636 | pm: \$(PM) |
637 | |
638 | XLIB = -Ixlib\\symbian |
639 | |
640 | XSBOPT = --win=\$(WIN) --arm=\$(ARM) |
641 | |
642 | lib\\Config.pm: |
643 | copy symbian\\config.sh config.sh |
644 | perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g" config.sh |
645 | perl \$(XLIB) configpm --cross=symbian |
646 | copy xlib\\symbian\\Config.pm lib\\Config.pm |
647 | perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" lib\\Config.pm |
648 | perl -pi.bak -e "s:5\\.\\d+\\.\\d+:$R_V_SV:g" lib\\Config.pm |
649 | -perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" xlib\\symbian\\Config_heavy.pl |
650 | |
651 | lib\\lib.pm: |
652 | perl lib\\lib_pm.PL |
653 | |
654 | ext\\DynaLoader\\DynaLoader.pm: |
655 | -del /f ext\\DynaLoader\\DynaLoader.pm |
656 | perl -Ixlib\\symbian ext\\DynaLoader\\DynaLoader_pm.PL |
657 | perl -pi.bak -e "s/__END__//" DynaLoader.pm |
658 | copy /y DynaLoader.pm ext\\DynaLoader\\DynaLoader.pm |
659 | -del /f DynaLoader.pm DynaLoader.pm.bak |
660 | |
661 | ext\\DynaLoader\\XSLoader.pm: |
662 | perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) XSLoader |
663 | |
664 | ext\\Errno\\Errno.pm: |
665 | perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) Errno |
666 | |
667 | miniperlexe.sis: miniperl_arm symbian\\makesis.pl |
668 | perl \$(XLIB) symbian\\makesis.pl miniperl |
669 | |
670 | perlexe.sis: perl_arm symbian\\makesis.pl |
671 | perl \$(XLIB) symbian\\makesis.pl perl |
672 | |
673 | |
674 | allsis: all miniperlexe.sis perlexe.sis perldll.sis perllib.sis perlext.sis perlapp.sis |
675 | |
676 | perldll.sis perl$VERSION.sis: perldll_arm pm symbian\\makesis.pl |
677 | perl \$(XLIB) symbian\\makesis.pl perl${VERSION}dll |
678 | |
c8f896e5 |
679 | perl${VERSION}lib.sis perllib.sis: \$(PM) |
27da23d5 |
680 | perl \$(XLIB) symbian\\makesis.pl perl${VERSION}lib |
681 | |
c8f896e5 |
682 | perl${VERSION}ext.sis perlext.sis: perldll_arm buildext_sis |
27da23d5 |
683 | perl symbian\\makesis.pl perl${VERSION}ext |
684 | |
c042ae3a |
685 | 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 |
27da23d5 |
686 | |
c042ae3a |
687 | buildext: perldll symbian\\xsbuild.pl lib\\Config.pm |
27da23d5 |
688 | perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) \$(EXT) |
689 | |
25ca88e0 |
690 | buildextcpp: perldll symbian\\xsbuild.pl lib\\Config.pm |
691 | perl \$(XLIB) symbian\\xsbuild.pl --csuffix .cpp \$(XSBOPT) \$(EXT) |
692 | |
c042ae3a |
693 | buildext_sis: perldll.sis symbian\\xsbuild.pl lib\\Config.pm |
27da23d5 |
694 | perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --sis \$(EXT) |
695 | |
25ca88e0 |
696 | buildextcpp_sis: perldll.sis symbian\\xsbuild.pl lib\\Config.pm |
697 | perl \$(XLIB) symbian\\xsbuild.pl --csuffix .cpp \$(XSBOPT) --sis \$(EXT) |
698 | |
27da23d5 |
699 | cleanext: symbian\\xsbuild.pl |
700 | perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT) |
701 | |
702 | distcleanext: symbian\\xsbuild.pl |
703 | perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --distclean \$(EXT) |
704 | |
705 | sis makesis: miniperl perl perldll pm buildext perlapp.sis |
706 | perl \$(XLIB) symbian\\makesis.pl |
707 | |
708 | APIDIR = \\Symbian\\perl\\$R_V_SV |
709 | |
710 | sdkinstall: |
711 | -mkdir \\Symbian\\perl |
712 | -mkdir \\Symbian\\perl\\$R_V_SV |
713 | -mkdir \$(APIDIR)\\include |
714 | -mkdir \$(APIDIR)\\include\\symbian |
715 | -mkdir \$(APIDIR)\\lib |
716 | -mkdir \$(APIDIR)\\lib\\ExtUtils |
717 | -mkdir \$(APIDIR)\\pod |
718 | -mkdir \$(APIDIR)\\bin |
719 | -mkdir \$(BINDIR) |
720 | copy /y *.h \$(APIDIR)\\include |
25ca88e0 |
721 | -copy /y *.inc \$(APIDIR)\\include |
27da23d5 |
722 | copy /y lib\\ExtUtils\\xsubpp \$(APIDIR)\\lib\\ExtUtils |
723 | copy /y lib\\ExtUtils\\typemap \$(APIDIR)\\lib\\ExtUtils |
c8f896e5 |
724 | copy /y lib\\ExtUtils\\ParseXS.pm \$(APIDIR)\\lib\\ExtUtils |
27da23d5 |
725 | copy /y symbian\\xsbuild.pl \$(APIDIR)\\bin |
c8f896e5 |
726 | copy /y symbian\\sisify.pl \$(APIDIR)\\bin |
27da23d5 |
727 | copy /y symbian\\PerlBase.h \$(APIDIR)\\include |
d0d72822 |
728 | copy /y symbian\\PerlUi.h \$(APIDIR)\\include |
c8f896e5 |
729 | copy /y symbian\\PerlUtil.h \$(APIDIR)\\include |
27da23d5 |
730 | copy /y symbian\\symbian*.h \$(APIDIR)\\include\\symbian |
731 | copy /y symbian\\PerlBase.pod \$(APIDIR)\\pod |
c8f896e5 |
732 | copy /y symbian\\PerlUtil.pod \$(APIDIR)\\pod |
27da23d5 |
733 | |
ed76c0e4 |
734 | RELDIR = $SYMBIAN_ROOT\\epoc32\\release |
27da23d5 |
735 | RELWIN = \$(RELDIR)\\\$(WIN)\\udeb |
736 | RELARM = \$(RELDIR)\\\$(ARM)\\$UARM |
c8f896e5 |
737 | SDKZIP = perl${VERSION}sdk.zip |
27da23d5 |
738 | |
c8f896e5 |
739 | |
740 | \$(SDKZIP) perlsdk.zip: perldll sdkinstall |
741 | -del /f perl${VERSION}sdk.zip |
27da23d5 |
742 | zip -r perl${VERSION}sdk.zip \$(RELWIN)\\perl$VERSION.* \$(RELARM)\\perl$VERSION.* \$(APIDIR) |
743 | \@echo perl${VERSION}sdk.zip created. |
744 | |
c8f896e5 |
745 | PERLSIS = perl${VERSION}.SIS perl${VERSION}lib.SIS perl${VERSION}ext.SIS |
746 | ALLSIS = \$(PERLSIS) perlapp.sis |
747 | ETC = README.symbian symbian\\PerlBase.pod symbian\\PerlUtil.pod symbian\\sisify.pl symbian\\TODO |
748 | |
749 | perl${VERSION}dist.zip perldist.zip: \$(ALLSIS) \$(SDKZIP) \$(ETC) |
750 | -del /f perl${VERSION}dist.zip |
751 | zip -r perl${VERSION}dist.zip \$(ALLSIS) \$(SDKZIP) \$(ETC) |
752 | |
ed76c0e4 |
753 | perlapp: sdkinstall perlapp_${WIN} perlapp_arm |
27da23d5 |
754 | |
c7a4d1c0 |
755 | perlapp_arm_minimal sisify_hex perlappmin.hex perlrscmin.hex: sdkinstall config.h |
756 | cd symbian; make perlapp_arm USERDEFS=-DCreatePerlAppMinimal |
757 | perl symbian\\hexdump.pl |
758 | |
ed76c0e4 |
759 | perlapp_win perlapp_${WIN}: config.h |
760 | cd symbian; make perlapp_${WIN} |
27da23d5 |
761 | |
762 | perlapp_arm: config.h |
763 | cd symbian; make perlapp_arm |
764 | |
c7a4d1c0 |
765 | perlapp_arm_clean: |
766 | cd symbian; make clean |
767 | |
27da23d5 |
768 | perlapp_demo_extract: |
769 | cd symbian; make perlapp_demo_extract |
770 | |
771 | perlapp.sis: perlapp_arm |
772 | cd symbian; make perlapp.sis |
773 | |
774 | perlapp.zip: |
c8f896e5 |
775 | cd symbian; zip perlapp.zip PerlApp.* PerlRecog.* PerlBase.* PerlUtil.* demo_pl |
27da23d5 |
776 | |
777 | zip: perlsdk.zip perlapp.zip |
778 | |
ed76c0e4 |
779 | freeze: freeze_${WIN} freeze_arm |
27da23d5 |
780 | |
ed76c0e4 |
781 | freeze_${WIN}: |
782 | abld freeze ${WIN} perl$VERSION |
27da23d5 |
783 | |
784 | freeze_arm: |
785 | abld freeze \$(ARM) perl$VERSION |
786 | |
ed76c0e4 |
787 | defrost: defrost_${WIN} defrost_arm |
27da23d5 |
788 | |
ed76c0e4 |
789 | defrost_${WIN}: |
27da23d5 |
790 | -del /f $windef1 |
791 | -del /f $windef2 |
792 | |
793 | defrost_arm: |
794 | -del /f $armdef1 |
795 | -del /f $armdef2 |
796 | |
ed76c0e4 |
797 | clean_${WIN}: abld.bat |
798 | abld clean ${WIN} |
27da23d5 |
799 | |
800 | clean_arm: abld.bat |
801 | abld clean \$(ARM) |
802 | |
ed76c0e4 |
803 | clean: clean_${WIN} clean_arm rerename_makedef |
27da23d5 |
804 | -del /f \$(PM) |
805 | -del /f \$(POD) |
806 | -del /f lib\\Config.pm.bak |
807 | -del /f xlib\\symbian\\Config_heavy.pl |
808 | -rmdir /s /q xlib |
809 | -del /f config.sh |
810 | -del /f DynaLoader.pm ext\\DynaLoader\\DynaLoader.pm |
811 | -del /f ext\\DynaLoader\\Makefile |
812 | -del /f ext\\SDBM_File\\sdbm\\Makefile |
813 | -del /f symbian\\*.lst |
814 | -del /f abld.bat @unclean *.pkg *.sis *.zip |
815 | -del /f symbian\\abld.bat symbian\\*.sis symbian\\*.zip |
816 | -del /f symbian\\perl5*.pkg symbian\\miniperl.pkg |
c7a4d1c0 |
817 | -del arm_*.mf ${WIN}_*.mf vc*.mf cw*.mf |
db5886f1 |
818 | -del symbian\\Makefile |
819 | -del symbian\\PerlUi.rss symbian\\PerlApp.rss |
c7a4d1c0 |
820 | -del perlappmin.hex perlrscmin.hex |
27da23d5 |
821 | -perl symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT) |
822 | -rmdir /s /q perl${VERSION}_Data |
823 | -cd symbian; make clean |
824 | |
825 | reallyclean: abld.bat |
826 | abld reallyclean |
827 | |
828 | distclean: defrost reallyclean clean |
829 | -perl symbian\\xsbuild.pl \$(XSBOPT) --distclean \$(EXT) |
830 | -del /f config.h config.sh.bak symbian\\symbian_port.h |
831 | -del /f Makefile symbian\\PerlApp.mmp |
832 | -del /f BMARM\\*.def |
833 | -del /f *.cwlink *.resources *.pref |
834 | -del /f perl${VERSION}.xml perl${VERSION}.mcp uid.cpp |
835 | -rmdir /s /q BMARM |
836 | cd symbian; make distclean |
837 | -del /f symbian\\Makefile |
838 | __EOF__ |
839 | close MAKEFILE; |
840 | } |
841 | else { |
842 | warn "$0: failed to create Makefile: $!\n"; |
843 | } |
844 | |
845 | if ( open( MAKEFILE, ">symbian/Makefile")) { |
ed76c0e4 |
846 | my $wrap = defined $S60SDK && $S60SDK eq '1.2' && $WIN ne '${WIN}cw'; |
27da23d5 |
847 | my $ABLD = $wrap ? 'perl b.pl': 'abld'; |
848 | print "\tsymbian/Makefile\n"; |
d0d72822 |
849 | my $MF = $WIN eq 'wins' ? 'vc6' : $WIN eq 'winscw' ? 'cw_ide' : "UNKNOWN"; |
27da23d5 |
850 | print MAKEFILE <<__EOF__; |
851 | WIN = $WIN |
852 | ARM = $ARM |
853 | ABLD = $ABLD |
d0d72822 |
854 | MF = $MF |
27da23d5 |
855 | |
856 | abld.bat: |
857 | bldmake bldfiles |
858 | |
ed76c0e4 |
859 | perlapp_${WIN}: abld.bat ..\\config.h PerlApp.h PerlApp.cpp |
d0d72822 |
860 | copy PerlUi$SDK_VARIANT.rss PerlApp.rss |
27da23d5 |
861 | bldmake bldfiles |
ed76c0e4 |
862 | \$(ABLD) build ${WIN} udeb |
27da23d5 |
863 | |
864 | perlapp_arm: ..\\config.h PerlApp.h PerlApp.cpp |
d0d72822 |
865 | copy PerlUi$SDK_VARIANT.rss PerlApp.rss |
27da23d5 |
866 | bldmake bldfiles |
ed76c0e4 |
867 | \$(ABLD) build ${ARM} $UARM |
27da23d5 |
868 | |
d0d72822 |
869 | $MF: |
870 | abld makefile $MF |
871 | |
27da23d5 |
872 | win.mf: |
873 | bldmake bldfiles |
d0d72822 |
874 | abld makefile $MF |
27da23d5 |
875 | |
876 | perlapp_demo_extract: |
877 | perl demo_pl extract |
878 | |
879 | perlapp.sis: perlapp_arm perlapp_demo_extract |
880 | -del /f perlapp.SIS |
881 | makesis perlapp.pkg |
882 | copy /y perlapp.SIS ..\\perlapp.SIS |
883 | |
884 | clean: |
885 | -perl demo_pl cleanup |
886 | -del /f perlapp.sis |
887 | -del /f b.pl |
d0d72822 |
888 | -del PerlApp.rss |
c7a4d1c0 |
889 | abld clean $WIN |
890 | abld clean thumb |
db5886f1 |
891 | -del Makefile |
27da23d5 |
892 | |
893 | distclean: clean |
894 | -del /f *.cwlink *.resources *.pref |
895 | -del /f PerlApp.xml PerlApp.mcp uid.cpp |
896 | -rmdir /s /q PerlApp_Data |
897 | -del /f abld.bat |
898 | __EOF__ |
899 | close(MAKEFILE); |
900 | if ($wrap) { |
901 | if ( open( B_PL, ">symbian/b.pl")) { |
902 | print B_PL <<'__EOF__'; |
903 | # abld.pl wrapper. |
904 | |
905 | # nmake doesn't like MFLAGS and MAKEFLAGS being set to -w and w. |
906 | delete $ENV{MFLAGS}; |
907 | delete $ENV{MAKEFLAGS}; |
908 | |
909 | system("abld @ARGV"); |
910 | __EOF__ |
911 | close(B_PL); |
912 | } else { |
913 | warn "$0: failed to create symbian/b.pl: $!\n"; |
914 | } |
915 | } |
916 | } else { |
917 | warn "$0: failed to create symbian/Makefile: $!\n"; |
918 | } |
919 | |
920 | print "Deleting...\n"; |
921 | for my $config ( |
922 | # Do not delete config.h here. |
923 | "config.sh", |
924 | "lib\\Config.pm", |
925 | "xlib\\symbian\\Config.pm", |
926 | "xlib\\symbian\\Config_heavy.pl", |
db5886f1 |
927 | "symbian\\PerlUi.rss", |
928 | "symbian\\PerlApp.rss", |
27da23d5 |
929 | ) { |
930 | print "\t$config\n"; |
931 | unlink($config); |
932 | } |
933 | |
934 | print <<__EOM__; |
935 | Configuring done. |
936 | Now you can run: |
937 | make all |
938 | make allsis |
939 | __EOM__ |
940 | |
941 | 1; # Happy End. |