From 0579b8279cb9ca33664c1cd9cd18e1e1df3f69c1 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 30 Mar 2011 15:49:00 +0100 Subject: [PATCH] [build] Include only one copy of each ROM in "make allroms" Each PCI ROM currently ends up appearing twice in the $(ROMS) list: once under its designated name (e.g. "rtl8139.rom"), once under its PCI IDs (e.g. "bin/10ec8139.rom"). Include only the latter of these in the $(ROMS) list, so that doing "make allroms" will generate only one copy of each ROM. Reported-by: Bastian Blank Signed-off-by: Michael Brown --- src/util/parserom.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/parserom.pl b/src/util/parserom.pl index 578eb1dc..a37e2a56 100644 --- a/src/util/parserom.pl +++ b/src/util/parserom.pl @@ -18,7 +18,7 @@ open DRV, "<$source" or die "Could not open $source: $!\n"; my $printed_family; sub rom { - ( my $type, my $image, my $desc, my $vendor, my $device ) = @_; + ( my $type, my $image, my $desc, my $vendor, my $device, my $dup ) = @_; my $ids = $vendor ? "$vendor,$device" : "-"; unless ( $printed_family ) { print "\n"; @@ -34,8 +34,8 @@ sub rom { print "ROM_DESCRIPTION_$image = \"$desc\"\n"; print "PCI_VENDOR_$image = 0x$vendor\n" if $vendor; print "PCI_DEVICE_$image = 0x$device\n" if $device; - print "ROMS += $image\n"; - print "ROMS_$driver_name += $image\n"; + print "ROMS += $image\n" unless $dup; + print "ROMS_$driver_name += $image\n" unless $dup; } while ( ) { @@ -49,8 +49,8 @@ while ( ) { \s*.*\s* # Driver data \)/x ) { ( my $vendor, my $device, my $image, my $desc ) = ( lc $1, lc $2, $3, $4 ); - rom ( "pci", $image, $desc, $vendor, $device ); rom ( "pci", lc "${vendor}${device}", $desc, $vendor, $device ); + rom ( "pci", $image, $desc, $vendor, $device, 1 ); } elsif ( /^\s*ISA_ROM\s*\( \s*\"([^\"]*)\"\s*, # Image \s*\"([^\"]*)\"\s* # Description