author | William Roberts <williamr@symbian.org> |
Sun, 10 Oct 2010 13:45:56 +0100 | |
changeset 12 | ab7598bdae30 |
child 16 | 58fdbe891c31 |
permissions | -rw-r--r-- |
12
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
1 |
# Copyright (c) 2010 Symbian Foundation Ltd. |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
2 |
# All rights reserved. |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
3 |
# This component and the accompanying materials are made available |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
4 |
# under the terms of the License "Eclipse Public License v1.0" |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
5 |
# which accompanies this distribution, and is available |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
7 |
# |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
8 |
# Initial Contributors: |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
9 |
# Symbian Foundation - initial contribution. |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
10 |
# |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
11 |
# Contributors: |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
12 |
# |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
13 |
# Description: |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
14 |
# This script generates a list of static dependencies for files in a ROM |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
15 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
16 |
use strict; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
17 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
18 |
my %romfiles; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
19 |
my @contents; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
20 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
21 |
my $line; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
22 |
while ($line = <>) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
23 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
24 |
my ($romfile,$hostfile,@columns) = split /,/, $line; # first two fields are guaranteed to be simple |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
25 |
next if (!defined $hostfile); |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
26 |
next if ($romfile eq "ROM file"); # skip header line |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
27 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
28 |
push @contents, "$romfile\t$hostfile"; # for use with "grep" later |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
29 |
$romfiles{lc $romfile} = $romfile; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
30 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
31 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
32 |
my %dependents; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
33 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
34 |
sub print_dependency($$@) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
35 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
36 |
my ($romfile,$hostfile,@dependencies) = @_; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
37 |
print "$romfile\t$hostfile\t", join(":",@dependencies), "\n"; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
38 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
39 |
# Create inverted table |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
40 |
foreach my $dependent (@dependencies) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
41 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
42 |
next if ($dependent =~ /^sid=/); |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
43 |
$dependent = lc $dependent; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
44 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
45 |
$dependent =~ s/^sys\\bin\\//; # no directory => sys\bin anyway |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
46 |
$dependent =~ s/\[\S+\]//; # ignore the UIDs for now |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
47 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
48 |
if (!defined $dependents{$dependent}) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
49 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
50 |
$dependents{$dependent} = $romfile; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
51 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
52 |
else |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
53 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
54 |
$dependents{$dependent} .= "\t$romfile"; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
55 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
56 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
57 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
58 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
59 |
sub generate_elftran_dependencies($$) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
60 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
61 |
my ($romfile,$hostfile) = @_; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
62 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
63 |
return if ($hostfile =~ /\/z\//); # data files in armv5\urel\z |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
64 |
return if ($hostfile =~ /\.sis$/); # not an e32 image file |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
65 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
66 |
my @elftran = `elftran $hostfile`; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
67 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
68 |
my $sid; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
69 |
my @imports; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
70 |
foreach my $line (@elftran) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
71 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
72 |
if ($line =~ /imports from (\S+)\{000a0000\}(\S+)$/) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
73 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
74 |
push @imports, $1.$2; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
75 |
next; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
76 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
77 |
if ($line =~ /^Secure ID: (\S+)$/) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
78 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
79 |
$sid = $1; # presumably owns private/$sid and various $sid.etxn files |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
80 |
next; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
81 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
82 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
83 |
print_dependency($romfile,$hostfile,"sid=$sid",@imports); |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
84 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
85 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
86 |
sub find_dependency_in_sys_bin($$$) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
87 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
88 |
my ($romfile,$hostfile,$basename) = @_; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
89 |
$basename = lc $basename; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
90 |
foreach my $extension (".exe",".dll") |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
91 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
92 |
my $dependency = "sys\\bin\\$basename$extension"; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
93 |
if (defined $romfiles{$dependency}) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
94 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
95 |
print_dependency($romfile,$hostfile,$romfiles{$dependency}); |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
96 |
return; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
97 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
98 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
99 |
# grep in the contents list? |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
100 |
# print_dependency($romfile,$hostfile,"unmatched sys\\bin\\$basename"); |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
101 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
102 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
103 |
foreach $line (@contents) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
104 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
105 |
my ($romfile,$hostfile) = split /\t/, $line; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
106 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
107 |
if ($hostfile =~ /epoc32.release.arm/i) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
108 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
109 |
generate_elftran_dependencies($romfile,$hostfile); |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
110 |
next; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
111 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
112 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
113 |
# App registration files |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
114 |
if ($romfile =~ /private.10003a3f.*apps\\(.*)_reg\.rsc$/i) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
115 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
116 |
my $dependency = "sys\\bin\\$1.exe"; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
117 |
print_dependency($romfile,$hostfile,$dependency); |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
118 |
next; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
119 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
120 |
# app resources |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
121 |
if ($romfile =~ /resource.apps\\(.*)(\.mif|\.mbm|\.rsc)$/) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
122 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
123 |
my $executable = $1; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
124 |
$executable =~ s/_aif$//; # xxx_aif.mif |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
125 |
$executable =~ s/_loc$//; # xxx_loc.rsc |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
126 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
127 |
find_dependency_in_sys_bin($romfile,$hostfile,$executable); |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
128 |
next; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
129 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
130 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
131 |
# Assume that the rest don't depend on anything, and leave them out. |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
132 |
} |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
133 |
|
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
134 |
print "\n"; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
135 |
foreach my $inverted (sort keys %dependents) |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
136 |
{ |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
137 |
print "x\t$inverted\t$dependents{$inverted}\n"; |
ab7598bdae30
Add tools\static_dependencies.pl which processes rom_contents.csv calculates static dependency information
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
138 |
} |