aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/symbian/AdaptAllMMPs.pl
diff options
context:
space:
mode:
authorJordi Vilalta Prat2010-10-12 02:18:11 +0000
committerJordi Vilalta Prat2010-10-12 02:18:11 +0000
commit8388e0dfea4ae0d80e51368acd12685c740c5bb5 (patch)
treef960376a145a830cd77b08264c1412f71ec02f7e /backends/platform/symbian/AdaptAllMMPs.pl
parent43161858ac14bae4ac6dea114d8b3e7a8c1b293b (diff)
downloadscummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.tar.gz
scummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.tar.bz2
scummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.zip
JANITORAL: Clean trailing whitespaces.
svn-id: r53160
Diffstat (limited to 'backends/platform/symbian/AdaptAllMMPs.pl')
-rw-r--r--backends/platform/symbian/AdaptAllMMPs.pl136
1 files changed, 68 insertions, 68 deletions
diff --git a/backends/platform/symbian/AdaptAllMMPs.pl b/backends/platform/symbian/AdaptAllMMPs.pl
index 8b7151c180..a81eab9af6 100644
--- a/backends/platform/symbian/AdaptAllMMPs.pl
+++ b/backends/platform/symbian/AdaptAllMMPs.pl
@@ -8,41 +8,41 @@ chdir("../../../");
@mmp_files = (
# Engine Project files
- "mmp/scummvm_agi.mmp",
- "mmp/scummvm_agos.mmp",
- "mmp/scummvm_cine.mmp",
- "mmp/scummvm_cruise.mmp",
- "mmp/scummvm_drascula.mmp",
- "mmp/scummvm_gob.mmp",
- "mmp/scummvm_groovie.mmp",
- "mmp/scummvm_kyra.mmp",
- "mmp/scummvm_lure.mmp",
+ "mmp/scummvm_agi.mmp",
+ "mmp/scummvm_agos.mmp",
+ "mmp/scummvm_cine.mmp",
+ "mmp/scummvm_cruise.mmp",
+ "mmp/scummvm_drascula.mmp",
+ "mmp/scummvm_gob.mmp",
+ "mmp/scummvm_groovie.mmp",
+ "mmp/scummvm_kyra.mmp",
+ "mmp/scummvm_lure.mmp",
"mmp/scummvm_m4.mmp",
"mmp/scummvm_made.mmp",
- "mmp/scummvm_parallaction.mmp",
- "mmp/scummvm_queen.mmp",
- "mmp/scummvm_saga.mmp",
- "mmp/scummvm_scumm.mmp",
- "mmp/scummvm_sky.mmp",
- "mmp/scummvm_sword1.mmp",
+ "mmp/scummvm_parallaction.mmp",
+ "mmp/scummvm_queen.mmp",
+ "mmp/scummvm_saga.mmp",
+ "mmp/scummvm_scumm.mmp",
+ "mmp/scummvm_sky.mmp",
+ "mmp/scummvm_sword1.mmp",
"mmp/scummvm_sword2.mmp",
- "mmp/scummvm_touche.mmp",
- "mmp/scummvm_tinsel.mmp",
- "mmp/scummvm_tucker.mmp",
- "mmp/scummvm_sci.mmp",
- "mmp/scummvm_draci.mmp",
- "mmp/scummvm_teenagent.mmp",
- "mmp/scummvm_mohawk.mmp",
- "mmp/scummvm_hugo.mmp",
+ "mmp/scummvm_touche.mmp",
+ "mmp/scummvm_tinsel.mmp",
+ "mmp/scummvm_tucker.mmp",
+ "mmp/scummvm_sci.mmp",
+ "mmp/scummvm_draci.mmp",
+ "mmp/scummvm_teenagent.mmp",
+ "mmp/scummvm_mohawk.mmp",
+ "mmp/scummvm_hugo.mmp",
# Target Platform Project Files
- "S60/ScummVM_S60.mmp",
- "S60v3/ScummVM_S60v3.mmp",
- "S60v3/ScummVM_A0000658_S60v3.mmp",
- "S80/ScummVM_S80.mmp",
+ "S60/ScummVM_S60.mmp",
+ "S60v3/ScummVM_S60v3.mmp",
+ "S60v3/ScummVM_A0000658_S60v3.mmp",
+ "S80/ScummVM_S80.mmp",
"S90/ScummVM_S90.mmp",
- "UIQ2/ScummVM_UIQ2.mmp",
+ "UIQ2/ScummVM_UIQ2.mmp",
"UIQ3/ScummVM_UIQ3.mmp",
- "UIQ3/ScummVM_A0000658_UIQ3.mmp"
+ "UIQ3/ScummVM_A0000658_UIQ3.mmp"
);
@@ -75,7 +75,7 @@ my @sections_kyra = ("", "ENABLE_LOL"); # special sections for engine KYRA
my @sections_agos = ("", "ENABLE_AGOS2"); # special sections for engine AGOS
# files excluded from build, case insensitive, will be matched in filename string only
-my @excludes_snd = (
+my @excludes_snd = (
"mt32.*",
"fluidsynth.cpp",
"i386.cpp",
@@ -86,14 +86,14 @@ my @excludes_snd = (
"rate.*" # not really needed, USE_ARM_SOUND_ASM currently not parsed correctly,
# "rate[_arm|_arm_asm].(cpp|s)" will be added later based on WINS/ARM build!
# These #defines for compile time are set in portdefs.h
-);
+);
-my @excludes_graphics = (
+my @excludes_graphics = (
"iff.cpp"
-);
+);
-my @excludes_gui = (
-);
+my @excludes_gui = (
+);
# the USE_ARM_* defines not parsed correctly, exclude manually:
my @excludes_scumm = (
@@ -147,7 +147,7 @@ Done. Enjoy :P
##################################################################################################################
##################################################################################################################
-# parses multiple sections per mmp/module
+# parses multiple sections per mmp/module
sub ParseModule
{
my ($mmp,$module,$sections,$exclusions) = @_;
@@ -172,7 +172,7 @@ sub CheckForModuleMK
if (-d $item)
{
#print "$item\n";
-
+
opendir DIR, $item;
#my @Files = readdir DIR;
my @Files = grep s/^([^\.].*)$/$1/, readdir DIR;
@@ -191,7 +191,7 @@ sub CheckForModuleMK
my $isenable;
my $ObjectsSelected = 0;
my $ObjectsTotal = 0;
-
+
print "$item for section '$section' ... ";
open FILE, $item;
@@ -200,14 +200,14 @@ sub CheckForModuleMK
my $count = @lines;
print "$count lines";
-
+
A: foreach $line (@lines)
{
# all things we need are inside #ifdef sections,
# there is nothing we need in #ifndef sections: so ignore these for now
-
- # found a section? reset
- if ($line =~ /^ifdef (.*)/)
+
+ # found a section? reset
+ if ($line =~ /^ifdef (.*)/)
{
$sec = $1;
$isenable = 1;
@@ -230,7 +230,7 @@ sub CheckForModuleMK
$line =~ s/ \\//; # remove possible trailing ' \'
$line =~ s/\//\\/g; # replace / with \
chop($line); # remove \n
-
+
# do we need to skip this file? According to our own @exclusions array
foreach $exclusion (@exclusions)
{
@@ -242,7 +242,7 @@ sub CheckForModuleMK
next A;
}
}
-
+
# do we need to do this file? According to MACROs in .MMPs
my $found = 0;
foreach $EnableDefine (@EnabledDefines)
@@ -270,7 +270,7 @@ sub CheckForModuleMK
$output .= "//SOURCE $line ($reason)\n";
next A;
}
-
+
$ObjectsSelected++;
#print "\n $line";
$output .= "SOURCE $line\n";
@@ -293,7 +293,7 @@ sub UpdateProjectFile
my $updated = " Updated @ ".localtime();
my $name;
my @mmp_files_plus_one = @mmp_files;
- unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
+ unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
foreach $name (@mmp_files_plus_one)
{
@@ -302,23 +302,23 @@ sub UpdateProjectFile
open FILE, "$file";
my @lines = <FILE>;
close FILE;
-
+
my $onestr = join("",@lines);
-
+
if ($onestr =~ /$n/)
{
print " - $name @ $n updating ... ";
-
+
$onestr =~ s/$a.*$b/$a$updated\n$output$b/s;
open FILE, ">$file";
print FILE $onestr;
close FILE;
-
+
print "done.\n";
}
}
-
+
$output = "";
}
@@ -328,7 +328,7 @@ sub UpdateSlaveMacros
{
my $updated = " Updated @ ".localtime();
- my $name = "mmp/scummvm_base.mmp";
+ my $name = "mmp/scummvm_base.mmp";
my $file = "$buildDir/$name";
print "Reading master MACROS from backends/symbian/$name ... ";
@@ -342,7 +342,7 @@ sub UpdateSlaveMacros
my $b = "\/\/STOP_$n\/\/";
$onestr =~ /$a(.*)$b/s;
my $macros = $1;
-
+
my $libs_first = "\n// automagically enabled static libs from macros above\n";
my $libs_second = "STATICLIBRARY scummvm_base.lib // must be above USE_* .libs\n";
my $macro_counter = 0;
@@ -355,7 +355,7 @@ sub UpdateSlaveMacros
if ($line =~ /^.*MACRO\s*([0-9A-Z_]*)\s*\/\/\s*LIB\:(.*)$/)
{
my $macro = $1; my $lib = $2;
-
+
# this macro enabled? then also add the .lib
if ($line =~ /^\s*MACRO\s*$macro/m)
{
@@ -366,7 +366,7 @@ sub UpdateSlaveMacros
if ($macro =~ /^ENABLE_/)
{
$libs_first .= "STATICLIBRARY $lib\n";
-
+
# add projects for BLD.INF's
my $projectname = substr("$lib",0,-4);
$projects .= "..\\mmp\\$projectname.mmp\n";
@@ -393,7 +393,7 @@ sub UpdateSlaveMacros
push @DisabledDefines, $macro; # used in CheckForModuleMK()!!
}
}
- }
+ }
print "$macro_counter macro lines.\n";
@@ -404,23 +404,23 @@ sub UpdateSlaveMacros
$m = "AUTO_PROJECTS";
$p = "\/\/START_$m\/\/";
$q = "\/\/STOP_$m\/\/";
-
+
foreach $name (@mmp_files)
{
$file = "$buildDir/$name";
$fileBLDINF = $buildDir .'/'. substr($name, 0, rindex($name, "/")) . "/BLD.INF";
print "Updating macros in $file ... ";
#print "Updating macros in backends/symbian/$name ... ";
-
+
open FILE, "$file"; @lines = <FILE>; close FILE;
$onestr = join("",@lines);
-
+
my $extralibs = ""; # output
# slash in name means it's a phone specific build file: add LIBs
$extralibs .= "$libs_first$libs_second" if (-e $fileBLDINF);
-
+
$onestr =~ s/$a.*$b/$a$updated$macros2$extralibs$b/s;
-
+
open FILE, ">$file"; print FILE $onestr; close FILE;
my $count = @lines;
@@ -434,13 +434,13 @@ sub UpdateSlaveMacros
open FILE, "$fileBLDINF"; @lines = <FILE>; close FILE;
$onestr = join("",@lines);
-
+
$onestr =~ s/$p.*$q/$p$updated$projects$q/s;
-
+
open FILE, ">$fileBLDINF"; print FILE $onestr; close FILE;
}
}
-}
+}
##################################################################################################################
@@ -448,10 +448,10 @@ sub ResetProjectFiles()
{
my $onestr, @lines;
my @mmp_files_plus_one = @mmp_files;
-# unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
-
+# unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
+
print "Resetting project files: ";
-
+
# we don't need to do mmp/scummvm_base.mmp", it was done in BuildPackageUpload.pl before the call to this script
foreach $name (@mmp_files_plus_one)
{
@@ -471,7 +471,7 @@ sub ResetProjectFiles()
$onestr = join("",@lines);
open FILE, ">$fileBLDINF"; print FILE $onestr; close FILE;
}
- }
+ }
print "... done.\n";
}