|
1 # Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 # All rights reserved. |
|
3 # This component and the accompanying materials are made available |
|
4 # under the terms of "Eclipse Public License v1.0" |
|
5 # which accompanies this distribution, and is available |
|
6 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 # |
|
8 # Initial Contributors: |
|
9 # Nokia Corporation - initial contribution. |
|
10 # |
|
11 # Contributors: |
|
12 # |
|
13 # Description: |
|
14 # Given a baseline list of components, generate scripts to do the build |
|
15 # |
|
16 # |
|
17 |
|
18 use strict; |
|
19 |
|
20 if (@ARGV<1 || ! -e $ARGV[0]) |
|
21 { |
|
22 #........1.........2.........3.........4.........5.........6.........7..... |
|
23 print <<USAGE_EOF; |
|
24 |
|
25 Usage: |
|
26 genbuild complist1 [complist2 ...] -- generate build scripts |
|
27 |
|
28 Given a list of components, generate the scripts necessary to |
|
29 build them all using the automated build system. The scripts |
|
30 will be named after the component list, so |
|
31 |
|
32 genbuild \\batch\\build\\somename.txt |
|
33 |
|
34 will generate the following scripts: |
|
35 |
|
36 somename_bldfiles.cmd - run "bldmake bldfiles" on every component |
|
37 somename_export.cmd - run "abld export" on every component |
|
38 somename_makefile.cmd - run "abld makefile" on every component |
|
39 somename_library.cmd - run "abld library" on every component |
|
40 somename_resource.cmd - run "abld resource" on every component |
|
41 somename_target.cmd - run "abld target" on every component |
|
42 somename_final.cmd - run "abld final" on every component |
|
43 somename_check.cmd - run "abld -check build" on every component |
|
44 somename_what.cmd - run "abld -what build" on every component |
|
45 somename_clean.cmd - run "abld clean" on every component |
|
46 somename_reallyclean.cmd - run "abld reallyclean" on every component |
|
47 |
|
48 somename_build.cmd - use appropriate combination of above scripts |
|
49 somename_pbuild.cmd - alternative build script for multi-machine builds |
|
50 |
|
51 The somename_build.cmd script is controlled by options specified in the |
|
52 list of components, and calls the other scripts in the correct sequence. |
|
53 |
|
54 USAGE_EOF |
|
55 exit 1; |
|
56 } |
|
57 |
|
58 # Check for EPOCROOT |
|
59 # It's not used directly by GENBUILD, but this is a good early stage at which |
|
60 # to discover that it hasn't been set... |
|
61 |
|
62 my $epocroot = $ENV{EPOCROOT}; |
|
63 die "ERROR: Must set the EPOCROOT environment variable\n" if (!defined($epocroot)); |
|
64 $epocroot =~ s-/-\\-go; # for those working with UNIX shells |
|
65 die "ERROR: EPOCROOT must not include a drive letter\n" if ($epocroot =~ /^.:/); |
|
66 die "ERROR: EPOCROOT must be an absolute path without a drive letter\n" if ($epocroot !~ /^\\/); |
|
67 die "ERROR: EPOCROOT must not be a UNC path\n" if ($epocroot =~ /^\\\\/); |
|
68 die "ERROR: EPOCROOT must end with a backslash\n" if ($epocroot !~ /\\$/); |
|
69 die "ERROR: EPOCROOT must specify an existing directory\n" if (!-d $epocroot); |
|
70 |
|
71 my $basename = $ARGV[0]; |
|
72 if ($basename =~ /^.*\\([^\\]+)$/) |
|
73 { |
|
74 $basename = $1; # lose the leading path, if any |
|
75 } |
|
76 if ($basename =~ /^([^.]+)\..*$/) |
|
77 { |
|
78 $basename = $1; # lose the trailing extensions, if any |
|
79 } |
|
80 |
|
81 |
|
82 my @components; |
|
83 my %arm_assplist; |
|
84 my $savespace=""; |
|
85 my $keepgoing=""; |
|
86 my $build_tools=0; |
|
87 my $build_cwtools=0; |
|
88 my $build_winc=0; |
|
89 my $build_wins=0; |
|
90 my $build_arm4=0; |
|
91 my $build_armi=0; |
|
92 my $build_thumb=0; |
|
93 my $build_arm3=0; |
|
94 my $build_armv5=0; |
|
95 my $epoc_only=0; |
|
96 my $build_winscw=0; |
|
97 my $backwards_compatible_defaults = 1; |
|
98 |
|
99 # Read from all supplied argument files, not just the first |
|
100 # Supplied options apply to all components listed. |
|
101 |
|
102 while (<>) |
|
103 { |
|
104 s/\s*#.*$//; |
|
105 s/^\s*//; |
|
106 my $line = lc $_; |
|
107 if ($line =~ /^$/) |
|
108 { |
|
109 next; |
|
110 } |
|
111 |
|
112 if ($line =~ /<option (\w+)\s*(.*)>/) |
|
113 { |
|
114 my $option = $1; |
|
115 my $optargs= $2; |
|
116 if ($option eq "savespace") |
|
117 { |
|
118 $savespace = "-savespace"; |
|
119 next; |
|
120 } |
|
121 if ($option eq "keepgoing") |
|
122 { |
|
123 $keepgoing = "-keepgoing"; |
|
124 next; |
|
125 } |
|
126 if ($option eq "tools") |
|
127 { |
|
128 $build_tools = 1; |
|
129 next; |
|
130 } |
|
131 if ($option eq "cwtools") |
|
132 { |
|
133 $build_cwtools = 1; |
|
134 next; |
|
135 } |
|
136 if ($option eq "winc") |
|
137 { |
|
138 $build_winc = 1; |
|
139 next; |
|
140 } |
|
141 if ($option eq "wins") |
|
142 { |
|
143 $build_wins = 1; |
|
144 $backwards_compatible_defaults = 0; # explicit <option wins> |
|
145 next; |
|
146 } |
|
147 if ($option eq "epoconly") |
|
148 { |
|
149 $build_winc = 0; |
|
150 $epoc_only = 1; |
|
151 next; |
|
152 } |
|
153 if ($option eq "arm4") |
|
154 { |
|
155 $build_arm4 = 1; |
|
156 $backwards_compatible_defaults = 0; # explicit <option arm4> |
|
157 next; |
|
158 } |
|
159 if ($option eq "armi") |
|
160 { |
|
161 $build_armi = 1; |
|
162 $backwards_compatible_defaults = 0; # explicit <option armi> |
|
163 next; |
|
164 } |
|
165 if ($option eq "thumb") |
|
166 { |
|
167 $build_thumb = 1; |
|
168 next; |
|
169 } |
|
170 if ($option eq "arm3") |
|
171 { |
|
172 $build_arm3 = 1; |
|
173 next; |
|
174 } |
|
175 if ($option eq "armv5") |
|
176 { |
|
177 $build_armv5 = 1; |
|
178 $backwards_compatible_defaults = 0; # explicit <option armv5> |
|
179 next; |
|
180 } |
|
181 |
|
182 if ($option eq "winscw") |
|
183 { |
|
184 $build_winscw = 1; |
|
185 next; |
|
186 } |
|
187 |
|
188 if ($option eq "arm_assp") |
|
189 { |
|
190 $arm_assplist{$optargs} = 1; |
|
191 next; |
|
192 } |
|
193 |
|
194 |
|
195 print "Option $1 not yet implemented\n"; |
|
196 next; |
|
197 } |
|
198 if ($line =~ /^([^<]\S+)\s+(\S+)/) |
|
199 { |
|
200 if (!-e "$2\\bld.inf") |
|
201 { |
|
202 print STDERR "MISSING COMPONENT $1: can't find $2\\bld.inf\n"; |
|
203 next; |
|
204 } |
|
205 } |
|
206 |
|
207 push @components, $line; |
|
208 } |
|
209 |
|
210 if ($backwards_compatible_defaults) |
|
211 { |
|
212 # Older versions automatically built these targets, without <option xxx> |
|
213 $build_wins = 1; |
|
214 $build_arm4 = 1; |
|
215 $build_armi = 1; |
|
216 } |
|
217 |
|
218 my %specials = ( |
|
219 "bldfiles e32toolp" => |
|
220 "cd tools\\e32toolp\\group\n". |
|
221 "call setupprj\n". |
|
222 "call bld rel\n" |
|
223 ); |
|
224 |
|
225 print_batch("bldfiles", "cd %2\n", "call bldmake bldfiles $keepgoing"); |
|
226 print_batch("export", "cd %2\n", "call abld export $keepgoing"); |
|
227 print_batch("makefile", "cd %2\n", "call abld makefile $keepgoing %arg1% %arg2% %arg3%"); |
|
228 print_batch("library", "cd %2\n", "call abld library $keepgoing %arg1% %arg2% %arg3%"); |
|
229 print_batch("resource", "cd %2\n", "call abld resource $keepgoing %arg1% %arg2% %arg3%"); |
|
230 print_batch("target", "cd %2\n", "call abld target $keepgoing $savespace %arg1% %arg2% %arg3%"); |
|
231 print_batch("final", "cd %2\n", "call abld final $keepgoing %arg1% %arg2% %arg3%"); |
|
232 print_batch("clean", "cd %2\n", "call abld clean $keepgoing %arg1% %arg2% %arg3%"); |
|
233 print_batch("reallyclean", "cd %2\n", "call abld reallyclean $keepgoing %arg1% %arg2% %arg3%"); |
|
234 print_batch("check", "cd %2\n", "call abld -check build %arg1% %arg2% %arg3%"); |
|
235 print_batch("what", "cd %2\n", "call abld -what build %arg1% %arg2% %arg3%"); |
|
236 |
|
237 print_control("build"); |
|
238 print_pcontrol("pbuild"); |
|
239 |
|
240 #-------------------------------------------------------------------- |
|
241 |
|
242 sub print_batch |
|
243 { |
|
244 my ($label, @actions) = @_; |
|
245 |
|
246 my $scriptbase = $basename."_".$label; |
|
247 open FILE, ">$scriptbase.cmd" or die "can't create $scriptbase.cmd"; |
|
248 print FILE <<HEAD_EOF; |
|
249 \@echo off |
|
250 setlocal |
|
251 echo ===------------------------------------------------- |
|
252 echo === $scriptbase %1 %2 %3 |
|
253 echo ===------------------------------------------------- |
|
254 perl -e "\$time=localtime; print '=== ',$label,' started ', \$time" |
|
255 echo . |
|
256 set arg1=%1 |
|
257 set arg2=%2 |
|
258 set arg3=%3 |
|
259 goto :doit |
|
260 |
|
261 :$label |
|
262 echo === $label == %3 |
|
263 perl -e "print '===+ ',time" |
|
264 echo . |
|
265 setlocal |
|
266 |
|
267 @actions |
|
268 |
|
269 endlocal |
|
270 goto :EOF |
|
271 |
|
272 :doit |
|
273 |
|
274 HEAD_EOF |
|
275 |
|
276 my $line; |
|
277 foreach $line (@components) |
|
278 { |
|
279 if ($line =~ /<special (\w+)\s+(\w+)(.*)>/) |
|
280 { |
|
281 if ($1 eq $label) |
|
282 { |
|
283 print FILE "REM special $1 $2\n"; |
|
284 print FILE "echo === $label == $2\n"; |
|
285 print FILE "setlocal\n\n"; |
|
286 print FILE $specials{"$1 $2"}; |
|
287 print FILE "\nendlocal\n\n"; |
|
288 } |
|
289 next; |
|
290 } |
|
291 #-------------------------------------------------------------------- |
|
292 my @MyList; |
|
293 my $tempvar; |
|
294 |
|
295 @MyList = split(/\s+/,$line); |
|
296 $tempvar= lc $MyList[$#MyList]; |
|
297 $tempvar =~ s/\\group//; |
|
298 push @MyList, $tempvar; |
|
299 print FILE "call :$label\t$MyList[0]\t$MyList[1]\t$MyList[2]\n"; |
|
300 #-------------------------------------------------------------------- |
|
301 } |
|
302 |
|
303 print FILE <<TAIL_EOF; |
|
304 |
|
305 perl -e "\$time=localtime; print '=== ',$label,' finished ', \$time" |
|
306 echo . |
|
307 perl -e "print '===+ ',time" |
|
308 echo . |
|
309 |
|
310 TAIL_EOF |
|
311 |
|
312 close FILE; |
|
313 print "Created $scriptbase.cmd\n"; |
|
314 } |
|
315 |
|
316 |
|
317 #-------------------------------------------------------------------- |
|
318 # Overall build |
|
319 |
|
320 sub print_control |
|
321 { |
|
322 my ($label) = @_; |
|
323 |
|
324 my $scriptbase = $basename."_".$label; |
|
325 open FILE, ">$scriptbase.cmd" or die "can't create $scriptbase.cmd"; |
|
326 |
|
327 print FILE <<HEAD_EOF; |
|
328 \@echo off |
|
329 setlocal |
|
330 perl -e "\$time=localtime; print '=== ',$scriptbase,' started ', \$time" |
|
331 echo . |
|
332 |
|
333 HEAD_EOF |
|
334 |
|
335 #-------------------------------------------------------- |
|
336 # Generic stuff first |
|
337 |
|
338 print FILE "call ${basename}_bldfiles\n"; |
|
339 print FILE "call ${basename}_export\n"; |
|
340 print FILE "\n"; |
|
341 |
|
342 #-------------------------------------------------------- |
|
343 # TOOLS, if any |
|
344 |
|
345 if ($build_tools) |
|
346 { |
|
347 print FILE "call ${basename}_makefile tools\n"; |
|
348 print FILE "call ${basename}_library tools\n"; |
|
349 print FILE "call ${basename}_target tools rel\n"; |
|
350 print FILE "call ${basename}_what tools rel\n"; |
|
351 print FILE "call ${basename}_check tools rel\n\n"; |
|
352 } |
|
353 |
|
354 #-------------------------------------------------------- |
|
355 # CWTOOLS, if any |
|
356 |
|
357 if ($build_cwtools) |
|
358 { |
|
359 print FILE "call ${basename}_makefile cwtools\n"; |
|
360 print FILE "call ${basename}_library cwtools\n"; |
|
361 print FILE "call ${basename}_target cwtools rel\n"; |
|
362 print FILE "call ${basename}_what cwtools rel\n"; |
|
363 print FILE "call ${basename}_check cwtools rel\n\n"; |
|
364 } |
|
365 |
|
366 #-------------------------------------------------------- |
|
367 # Emulator things, WINS and WINC |
|
368 |
|
369 unless ($epoc_only) |
|
370 { |
|
371 if ($build_winc) |
|
372 { |
|
373 print FILE "call ${basename}_makefile winc\n"; |
|
374 # No resource step for WINC |
|
375 print FILE "call ${basename}_library winc\n"; |
|
376 print FILE "call ${basename}_target winc\n"; |
|
377 print FILE "call ${basename}_what winc\n"; |
|
378 print FILE "call ${basename}_check winc\n"; |
|
379 print FILE "\n"; |
|
380 } |
|
381 |
|
382 if ($build_wins) |
|
383 { |
|
384 print FILE "call ${basename}_makefile wins\n"; |
|
385 print FILE "call ${basename}_resource wins\n"; |
|
386 print FILE "call ${basename}_library wins\n"; |
|
387 print FILE "call ${basename}_target wins\n"; |
|
388 print FILE "\n"; |
|
389 } |
|
390 |
|
391 if ($build_winscw) |
|
392 { |
|
393 print FILE "call ${basename}_makefile winscw\n"; |
|
394 print FILE "call ${basename}_resource winscw\n"; |
|
395 print FILE "call ${basename}_library winscw\n"; |
|
396 print FILE "call ${basename}_target winscw\n"; |
|
397 print FILE "\n"; |
|
398 } |
|
399 |
|
400 if ($build_wins) |
|
401 { |
|
402 print FILE "call ${basename}_final wins\n"; |
|
403 print FILE "call ${basename}_what wins\n"; |
|
404 print FILE "call ${basename}_check wins\n"; |
|
405 print FILE "\n"; |
|
406 } |
|
407 |
|
408 if ($build_winscw) |
|
409 { |
|
410 print FILE "call ${basename}_final winscw\n"; |
|
411 print FILE "call ${basename}_what winscw\n"; |
|
412 print FILE "call ${basename}_check winscw\n"; |
|
413 print FILE "\n"; |
|
414 } |
|
415 } |
|
416 |
|
417 #-------------------------------------------------------- |
|
418 # ARM things |
|
419 |
|
420 # Generic build(s) first, followed by the ASSPs (if any) |
|
421 # |
|
422 |
|
423 my $name; |
|
424 my $stage; |
|
425 my @armthings = (); |
|
426 if ($build_arm4) |
|
427 { |
|
428 push @armthings, "arm4"; |
|
429 } |
|
430 if ($build_armi) |
|
431 { |
|
432 push @armthings, "armi"; |
|
433 } |
|
434 if ($build_thumb) |
|
435 { |
|
436 push @armthings, "thumb"; |
|
437 } |
|
438 if ($build_arm3) |
|
439 { |
|
440 push @armthings, "arm3"; |
|
441 } |
|
442 if ($build_armv5) |
|
443 { |
|
444 push @armthings, "armv5"; |
|
445 } |
|
446 push @armthings, (sort keys %arm_assplist); |
|
447 |
|
448 foreach $stage ("makefile", "resource", "library", "target", "final", "what", "check") |
|
449 { |
|
450 foreach $name (@armthings) |
|
451 { |
|
452 printf FILE "call ${basename}_%-8s $name\n", $stage; |
|
453 } |
|
454 print FILE "\n"; |
|
455 } |
|
456 |
|
457 print FILE <<TAIL_EOF; |
|
458 |
|
459 perl -e "\$time=localtime; print '=== ',$scriptbase,' finished ', \$time" |
|
460 echo . |
|
461 |
|
462 TAIL_EOF |
|
463 |
|
464 close FILE; |
|
465 print "Created $scriptbase.cmd\n"; |
|
466 } |
|
467 |
|
468 |
|
469 #-------------------------------------------------------------------- |
|
470 # Overall build, subdivided for multi-machine building |
|
471 |
|
472 sub print_pcontrol |
|
473 { |
|
474 my ($label) = @_; |
|
475 |
|
476 my $scriptbase = $basename."_".$label; |
|
477 open FILE, ">$scriptbase.cmd" or die "can't create $scriptbase.cmd"; |
|
478 |
|
479 print FILE <<HEAD_EOF; |
|
480 \@echo off |
|
481 setlocal |
|
482 perl -e "\$time=localtime; print '=== ',$scriptbase,' started ', \$time" |
|
483 echo . |
|
484 |
|
485 goto build_%1 |
|
486 |
|
487 HEAD_EOF |
|
488 |
|
489 #======================================================== |
|
490 # Getting Ready |
|
491 # |
|
492 # Building tools, include files, makefiles, resources |
|
493 # and libraries |
|
494 # |
|
495 |
|
496 print FILE ":build_libs\n"; |
|
497 print FILE "\n"; |
|
498 |
|
499 #-------------------------------------------------------- |
|
500 # Generic stuff first |
|
501 |
|
502 print FILE "call ${basename}_bldfiles\n"; |
|
503 print FILE "call ${basename}_export\n"; |
|
504 print FILE "\n"; |
|
505 |
|
506 #-------------------------------------------------------- |
|
507 # TOOLS, if any |
|
508 |
|
509 if ($build_tools) |
|
510 { |
|
511 print FILE "call ${basename}_makefile tools\n"; |
|
512 print FILE "call ${basename}_library tools\n"; |
|
513 print FILE "call ${basename}_target tools rel\n"; |
|
514 print FILE "call ${basename}_what tools rel\n"; |
|
515 print FILE "call ${basename}_check tools rel\n\n"; |
|
516 } |
|
517 |
|
518 #-------------------------------------------------------- |
|
519 # CWTOOLS, if any |
|
520 |
|
521 if ($build_cwtools) |
|
522 { |
|
523 print FILE "call ${basename}_makefile cwtools\n"; |
|
524 print FILE "call ${basename}_library cwtools\n"; |
|
525 print FILE "call ${basename}_target cwtools rel\n"; |
|
526 print FILE "call ${basename}_what cwtools rel\n"; |
|
527 print FILE "call ${basename}_check cwtools rel\n\n"; |
|
528 } |
|
529 |
|
530 #-------------------------------------------------------- |
|
531 # Emulator things, WINS and WINC, up to resources |
|
532 |
|
533 if ($build_winc) |
|
534 { |
|
535 print FILE "call ${basename}_makefile winc\n"; |
|
536 print FILE "call ${basename}_library winc\n"; |
|
537 print FILE "call ${basename}_target winc\n"; |
|
538 print FILE "call ${basename}_what winc\n"; |
|
539 print FILE "call ${basename}_check winc\n"; |
|
540 print FILE "\n"; |
|
541 } |
|
542 |
|
543 if ($build_wins) |
|
544 { |
|
545 print FILE "call ${basename}_makefile wins\n"; |
|
546 print FILE "call ${basename}_resource wins\n"; |
|
547 print FILE "call ${basename}_library wins\n"; |
|
548 print FILE "\n"; |
|
549 } |
|
550 |
|
551 #-------------------------------------------------------- |
|
552 # ARM things |
|
553 |
|
554 # Generic build(s) first, followed by the ASSPs (if any) |
|
555 # |
|
556 |
|
557 my $name; |
|
558 my $stage; |
|
559 my @epocthings = (); |
|
560 if ($build_arm4) |
|
561 { |
|
562 push @epocthings, "arm4"; |
|
563 } |
|
564 if ($build_armi) |
|
565 { |
|
566 push @epocthings, "armi"; |
|
567 } |
|
568 if ($build_thumb) |
|
569 { |
|
570 push @epocthings, "thumb"; |
|
571 } |
|
572 |
|
573 if ($build_arm3) |
|
574 { |
|
575 push @epocthings, "arm3"; |
|
576 } |
|
577 if ($build_armv5) |
|
578 { |
|
579 push @epocthings, "armv5"; |
|
580 } |
|
581 |
|
582 push @epocthings, (sort keys %arm_assplist); |
|
583 |
|
584 # For all EPOC things... |
|
585 |
|
586 foreach $stage ("makefile", "resource", "library") |
|
587 { |
|
588 foreach $name (@epocthings) |
|
589 { |
|
590 printf FILE "call ${basename}_%-8s $name\n", $stage; |
|
591 } |
|
592 if ($build_winscw) |
|
593 { |
|
594 printf FILE "call ${basename}_%-8s winscw\n", $stage; |
|
595 } |
|
596 print FILE "\n"; |
|
597 } |
|
598 |
|
599 print FILE "goto :EOF\n"; |
|
600 print FILE "\n"; |
|
601 |
|
602 #======================================================== |
|
603 # Completing the Emulator |
|
604 # |
|
605 |
|
606 print FILE ":build_wins\n"; |
|
607 print FILE "\n"; |
|
608 |
|
609 print FILE "call ${basename}_bldfiles\n"; |
|
610 print FILE "call ${basename}_target wins\n"; |
|
611 print FILE "goto :EOF\n"; |
|
612 print FILE "\n"; |
|
613 |
|
614 print FILE ":build_wins_final\n"; |
|
615 print FILE "\n"; |
|
616 |
|
617 print FILE "call ${basename}_final wins\n"; |
|
618 print FILE "call ${basename}_what wins\n"; |
|
619 print FILE "call ${basename}_check wins\n"; |
|
620 print FILE "goto :EOF\n"; |
|
621 print FILE "\n"; |
|
622 |
|
623 #======================================================== |
|
624 if ($build_winscw){ |
|
625 # Completing the Emulator using CodeWarrior |
|
626 # |
|
627 |
|
628 print FILE ":build_winscw\n"; |
|
629 print FILE "\n"; |
|
630 |
|
631 print FILE "call ${basename}_bldfiles\n"; |
|
632 print FILE "call ${basename}_target winscw\n"; |
|
633 print FILE "goto :EOF\n"; |
|
634 print FILE "\n"; |
|
635 |
|
636 print FILE ":build_winscw_final\n"; |
|
637 print FILE "\n"; |
|
638 |
|
639 |
|
640 print FILE "call ${basename}_final winscw\n"; |
|
641 print FILE "call ${basename}_what winscw\n"; |
|
642 print FILE "call ${basename}_check winscw\n"; |
|
643 print FILE "goto :EOF\n"; |
|
644 print FILE "\n"; |
|
645 } |
|
646 #======================================================== |
|
647 # Completing the ARM targets |
|
648 # |
|
649 |
|
650 foreach $name (@epocthings) |
|
651 { |
|
652 print FILE ":build_$name\n"; |
|
653 print FILE "\n"; |
|
654 |
|
655 print FILE "call ${basename}_bldfiles\n"; |
|
656 foreach $stage ("target", "final", "what", "check") |
|
657 { |
|
658 printf FILE "call ${basename}_%-8s $name\n", $stage; |
|
659 } |
|
660 print FILE "goto :EOF\n"; |
|
661 print FILE "\n"; |
|
662 } |
|
663 |
|
664 print FILE <<TAIL_EOF; |
|
665 |
|
666 perl -e "\$time=localtime; print '=== ',$scriptbase,' finished ', \$time" |
|
667 echo . |
|
668 |
|
669 TAIL_EOF |
|
670 |
|
671 close FILE; |
|
672 print "Created $scriptbase.cmd\n"; |
|
673 } |
|
674 |
|
675 |