equal
deleted
inserted
replaced
117 } |
117 } |
118 |
118 |
119 my @path = split(/\\/, $cwd); |
119 my @path = split(/\\/, $cwd); |
120 shift(@path); |
120 shift(@path); |
121 $toroot = ('..\\') x @path; |
121 $toroot = ('..\\') x @path; |
122 $toroot =~ s/\\$//; |
|
123 #e32path supposed to be = to "\sf\os" |
|
124 $e32path = $fp0; |
122 $e32path = $fp0; |
125 $e32path =~ s/\\kernelhwsrv\\kernel\\eka\\rombuild\\rom_sbs\.pl$//i; |
123 $e32path =~ s/\\kernelhwsrv\\kernel\\eka\\rombuild\\rom\.pl$//i; |
126 $e32path =~ s/^[A-Za-z]://; |
124 $e32path =~ s/^[A-Za-z]://; |
127 $rombuildpath = $toroot."\\sf\\os\\kernelhwsrv\\kernel\\eka\\rombuild"; |
125 $rombuildpath = $toroot."sf\\os\\kernelhwsrv\\kernel\\eka\\rombuild"; |
128 $Epoc32Path = $toroot; |
126 $Epoc32Path = $toroot; |
129 $Epoc32Path =~ s/\\$//; |
127 $Epoc32Path =~ s/\\$//; |
130 $Epoc32Path .= $EpocRoot . "epoc32"; |
128 $Epoc32Path .= $EpocRoot . "epoc32"; |
131 $toolpath = "$Epoc32Path\\tools\\"; |
129 $toolpath = "$Epoc32Path\\tools\\"; |
132 push @INC, $toolpath; |
130 push @INC, $toolpath; |
133 $BasePath = $toroot . $e32path."\\"; |
131 $BasePath = $toroot . $e32path; |
134 } |
132 } |
135 |
133 |
136 use E32Plat; |
134 use E32Plat; |
137 { |
135 { |
138 Plat_Init($toolpath); |
136 Plat_Init($toolpath); |
237 open(X, "$skel") || die "Can't open type file $skel, $!"; |
235 open(X, "$skel") || die "Can't open type file $skel, $!"; |
238 open(OUT, "> rom1.tmp") || die "Can't open output file, $!"; |
236 open(OUT, "> rom1.tmp") || die "Can't open output file, $!"; |
239 |
237 |
240 # First output the ROM name |
238 # First output the ROM name |
241 print OUT "\nromname=$romname\n"; |
239 print OUT "\nromname=$romname\n"; |
242 # Go through the iby file passed as parameter of this script and replace flags by proper values before copying the line in rom1.tmp. |
|
243 while(<X>) { |
240 while(<X>) { |
244 s/\#\#ASSP\#\#/$opts{'assp'}/; |
241 s/\#\#ASSP\#\#/$opts{'assp'}/; |
245 s/\#\#VARIANT\#\#/$opts{'variant'}/; |
242 s/\#\#VARIANT\#\#/$opts{'variant'}/; |
246 s/\#\#BUILD\#\#/$opts{'build'}/; |
243 s/\#\#BUILD\#\#/$opts{'build'}/; |
247 s/\#\#MAIN\#\#/$main/; |
244 s/\#\#MAIN\#\#/$main/; |
313 my $cppcmd; |
310 my $cppcmd; |
314 if($opts{'build'}=~/^u/i) { |
311 if($opts{'build'}=~/^u/i) { |
315 # Unicode build |
312 # Unicode build |
316 $cppcmd = "$Epoc32Path/gcc/bin/cpp $cppflags -D UNICODE $defines rom1.tmp rom2.tmp"; |
313 $cppcmd = "$Epoc32Path/gcc/bin/cpp $cppflags -D UNICODE $defines rom1.tmp rom2.tmp"; |
317 } else { |
314 } else { |
318 $cppcmd = "$Epoc32Path/gcc/bin/cpp $cppflags $defines rom1.tmp rom2.tmp"; |
315 $cppcmd = "cpp $cppflags $defines rom1.tmp rom2.tmp"; |
319 } |
316 } |
320 print "Executing CPP:\n\t$cppcmd\n" if $debug; |
317 print "Executing CPP:\n\t$cppcmd\n" if $debug; |
321 $ret = system($cppcmd); |
318 $ret = system($cppcmd); |
322 die "ERROR EXECUTING CPP\n" if $ret; |
319 die "ERROR EXECUTING CPP\n" if $ret; |
323 |
320 |
594 # Not blank |
591 # Not blank |
595 $lastblank=0; |
592 $lastblank=0; |
596 if ($k and $line=~/^\s*kerneltrace/i) { |
593 if ($k and $line=~/^\s*kerneltrace/i) { |
597 $line = "kerneltrace $k\n"; |
594 $line = "kerneltrace $k\n"; |
598 } |
595 } |
599 |
|
600 # This next line is about converting all the / to \ to make sure that we are using the right format for the build generation |
|
601 $line =~ s/\//\\/g; |
|
602 |
|
603 print OUTPUT_FILE $line if !($line=~/^\s*REM\s+/i); |
596 print OUTPUT_FILE $line if !($line=~/^\s*REM\s+/i); |
604 } |
597 } |
605 } |
598 } |
606 close(INPUT_FILE); |
599 close(INPUT_FILE); |
607 close(OUTPUT_FILE); |
600 close(OUTPUT_FILE); |