bfd
[binutils.git] / gas / testsuite / gas / rx / make-d
blobbe1958e602635ada0faefa56e411715b4ded0d30
1 #!/usr/bin/perl
2 # -*- perl -*-
4 # Utility to create *.d files from *.lst files. Not normally needed.
6 opendir L, "/tmp/lsts";
7 for $f (sort readdir L) {
8 next unless $f =~ /\.lst/;
9 $f =~ s@\.lst@@;
10 push (@files, $f);
12 closedir L;
14 for $f (@files) {
16 open (I, "/tmp/lsts/$f.lst");
17 open (O, ">$f.d");
19 print O "#objdump: -dr\n";
21 while (<I>) {
22 s/$f\.o/dump.o/;
23 s/\\/\\\\/g;
24 s/([\[\]\.\*\?\+])/\\$1/g;
25 s/file format .*/file format \.\*/;
26 print O;
29 close I;
30 close O;