syborg_stem/buildrom.pm
changeset 1 aa7fc13e36fb
parent 0 01a8f4b3ef59
child 3 df09f0d786ec
--- a/syborg_stem/buildrom.pm	Thu Oct 07 20:13:43 2010 +0100
+++ b/syborg_stem/buildrom.pm	Thu Oct 07 21:17:22 2010 +0100
@@ -254,6 +254,7 @@
 my $sourceline;
 my ($line);
 my %romfiles;
+my %ibyfiles; # record the iby file for each ROM file
 
 # To handle BINARY_SELECTION_ORDER macro.
 my $firstDIR;
@@ -3640,6 +3641,7 @@
 		}
 	}
 	$romfiles{$romfile} = $variant.$pcfile;
+	$ibyfiles{$romfile} = $sourcefile;
 	return "$type$variant=$pcfile \t\"$romfile\"$tail\n";
 }
 
@@ -4016,10 +4018,11 @@
 			}
 	
 			my @sources = split /\n/,$romfiles{$file};
-			printf DIRFILE "%-40s\t%s\n", $file, shift @sources;
+			my @ibyfiles = split /\n/,$ibyfiles{$file};
+			printf DIRFILE "%-40s\t%s\t%s\n", $file, shift @sources, shift @ibyfiles;
 			while (@sources)
 			{
-				printf DIRFILE "%39s+\t%s\n", "", shift @sources;
+				printf DIRFILE "%39s+\t%s\t%s\n", "", shift @sources, shift @ibyfiles;
 			}
 		}
 		close DIRFILE;