--- a/tools/static_dependencies.pl Mon Oct 11 15:56:10 2010 +0100
+++ b/tools/static_dependencies.pl Mon Oct 11 22:33:08 2010 +0100
@@ -14,6 +14,12 @@
# This script generates a list of static dependencies for files in a ROM
use strict;
+use Getopt::Long;
+
+my $inverted_table = 0;
+GetOptions(
+ "i|invert" => \$inverted_table, # add the inverted table
+ );
my %romfiles;
my @contents;
@@ -36,6 +42,8 @@
my ($romfile,$hostfile,@dependencies) = @_;
print "$romfile\t$hostfile\t", join(":",@dependencies), "\n";
+ next unless $inverted_table;
+
# Create inverted table
foreach my $dependent (@dependencies)
{
@@ -133,8 +141,11 @@
# Assume that the rest don't depend on anything, and leave them out.
}
-print "\n";
-foreach my $inverted (sort keys %dependents)
+if ($inverted_table)
{
- print "x\t$inverted\t$dependents{$inverted}\n";
+ print "\n";
+ foreach my $inverted (sort keys %dependents)
+ {
+ print "x\t$inverted\t$dependents{$inverted}\n";
+ }
}