0f48dd3474d401a713e4e19082c31ee209835898
[deliverable/binutils-gdb.git] / gas / testsuite / gas / rx / make-d
1 #!/usr/bin/perl
2 # -*- perl -*-
3
4 # Copyright 2012
5 # Free Software Foundation, Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
20
21 # Utility to create *.d files from *.lst files. Not normally needed.
22
23 opendir L, "/tmp/lsts";
24 for $f (sort readdir L) {
25 next unless $f =~ /\.lst/;
26 $f =~ s@\.lst@@;
27 push (@files, $f);
28 }
29 closedir L;
30
31 for $f (@files) {
32
33 open (I, "/tmp/lsts/$f.lst");
34 open (O, ">$f.d");
35
36 print O "#objdump: -dr\n";
37
38 while (<I>) {
39 s/$f\.o/dump.o/;
40 s/\\/\\\\/g;
41 s/([\[\]\.\*\?\+])/\\$1/g;
42 s/file format .*/file format \.\*/;
43 print O;
44 }
45
46 close I;
47 close O;
48 }
This page took 0.057714 seconds and 4 git commands to generate.