# HG changeset patch # User William Roberts # Date 1290086190 0 # Node ID b9832c8d3f368b173c05cc7d0155caf06ed1de47 # Parent 79169c91b4721abe16102482f9d58a9c8c9cada9 Update filter_obyfile.pl to ignore stem_* executables if the substitution is not requested diff -r 79169c91b472 -r b9832c8d3f36 tools/filter_obyfile.pl --- a/tools/filter_obyfile.pl Thu Nov 18 11:35:56 2010 +0000 +++ b/tools/filter_obyfile.pl Thu Nov 18 13:16:30 2010 +0000 @@ -132,6 +132,14 @@ next; } } + else + { + if ($hostfile =~ /\/stem_/) + { + # print STDERR "Ignoring dependencies of $hostfile because there is no stem substitution of $romfile\n"; + next; + } + } $lc_romfiles{lc $romfile} = $romfile; @@ -222,7 +230,7 @@ if (0) { - foreach my $exe ("libopenvg.dll", "libopenvg_sw.dll", "backend.dll", "qtgui.dll") + foreach my $exe ("libopenvg.dll", "libopenvg_sw.dll", "backend.dll", "qtgui.dll", "mediaclientaudio.dll") { printf STDERR "Dependents of %s = %s\n", $exe, join(", ", @{$exe_dependencies{$exe}}); } @@ -289,23 +297,29 @@ my $namelength = length($romexe); foreach my $dependent (@{$exe_dependencies{$romexe}}) { - next if (defined $deletions{$dependent}); # already + if (defined $deletions{$dependent}) + { + # print STDERR "Already deleted $dependent of $romexe\n"; + next; # already deleted + } if ($dependent =~ /^sys.bin.(.*)$/i) { my $depexe = lc $1; my $imports; + # print STDERR "Checking $depexe for detailed dependency on $romexe\n"; foreach my $prerequisite (@{$exe_prerequisites{$depexe}}) { if (substr($prerequisite, 0, $namelength) eq $romexe) { $imports = substr($prerequisite, $namelength+1); # skip name and "@" + # print STDERR "Found imports >$imports<\n"; last; } } if (!defined $imports) { - printf STDERR "Failed to find ordinals imported from %s by %s (in %s)\n", + printf STDERR "Internal error: Failed to find ordinals imported from %s by %s (in %s)\n", $romexe, $dependent, join(":",@{$exe_prerequisites{$depexe}}); next; } @@ -313,7 +327,7 @@ if ($compatible ne "OK") { $deletions{$dependent} = "$romexe $compatible"; - # print_detail("Deleting $dependent because of slimmed $romexe ($compatible)"); + print_detail("Deleting $dependent because of slimmed $romexe ($compatible)"); } } }