Develop and Download Open Source Software

Browse CVS Repository

Contents of /mame32jp/mame32jp/src/makelist.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Thu Apr 25 18:27:03 2002 UTC (21 years, 11 months ago) by zero
Branch: MAIN
CVS Tags: ver_0_60_1, ver0_59_13, ver0_59_14, ver0_60_2, ver0_60_3, ver0_60_4, ver0_60_5, HEAD
Changes since 1.2: +0 -0 lines
File MIME type: text/x-perl
*** empty log message ***

1 open(READ,'src/rules.mak');
2 $cpulist = "";
3 $soundlist = "";
4 while (<READ>)
5 {
6 if (/CPU=\$\(strip \$\(findstring ([^@]*)@,\$\(CPUS\)\)\)/)
7 {
8 $cpulist .= "#if (HAS_$1)\n\tCPU_$1,\n#endif\n";
9 }
10 if (/SOUND=\$\(strip \$\(findstring ([^@]*)@,\$\(SOUNDS\)\)\)/)
11 {
12 $soundlist .= "#if (HAS_$1)\n\tSOUND_$1,\n#endif\n";
13 }
14 }
15 close(READ);
16
17 undef $/;
18 $file = 'src/cpuintrf.h';
19 open(READ,$file);
20 $src = <READ>;
21 close(READ);
22 if ($src =~ s/CPU_DUMMY.*CPU_COUNT/CPU_DUMMY,\n$cpulist\tCPU_COUNT/sg)
23 {
24 print "Regenerating src/cpuintrf.h\n";
25 open(WRITE,">$file");
26 print WRITE $src;
27 close(WRITE);
28 }
29 else
30 {
31 print "makelist.pl: can't find CPU list in src/cpuintrf.h\n";
32 }
33
34 $file = 'src/sndintrf.h';
35 open(READ,$file);
36 $src = <READ>;
37 close(READ);
38 if ($src =~ s/SOUND_DUMMY.*SOUND_COUNT/SOUND_DUMMY,\n$soundlist\tSOUND_COUNT/sg)
39 {
40 print "Regenerating src/sndintrf.h\n";
41 open(WRITE,">$file");
42 print WRITE $src;
43 close(WRITE);
44 }
45 else
46 {
47 print "makelist.pl: can't find SOUND list in src/sndintrf.h\n";
48 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26