]>
Commit | Line | Data |
---|---|---|
1b916ca6 JM |
1 | #!/bin/sh |
2 | # Generate avr-tables.opt from the list in avr-mcus.def. | |
23a5b65a | 3 | # Copyright (C) 2011-2014 Free Software Foundation, Inc. |
1b916ca6 JM |
4 | # |
5 | # This file is part of GCC. | |
6 | # | |
7 | # GCC 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, or (at your option) | |
10 | # any later version. | |
11 | # | |
12 | # GCC 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 GCC; see the file COPYING3. If not see | |
19 | # <http://www.gnu.org/licenses/>. | |
20 | ||
21 | cat <<EOF | |
22 | ; -*- buffer-read-only: t -*- | |
23 | ; Generated automatically by genopt.sh from avr-mcus.def. | |
24 | ||
23a5b65a | 25 | ; Copyright (C) 2011-2014 Free Software Foundation, Inc. |
1b916ca6 JM |
26 | ; |
27 | ; This file is part of GCC. | |
28 | ; | |
29 | ; GCC is free software; you can redistribute it and/or modify it under | |
30 | ; the terms of the GNU General Public License as published by the Free | |
31 | ; Software Foundation; either version 3, or (at your option) any later | |
32 | ; version. | |
33 | ; | |
34 | ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
35 | ; WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
36 | ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
37 | ; for more details. | |
38 | ; | |
39 | ; You should have received a copy of the GNU General Public License | |
40 | ; along with GCC; see the file COPYING3. If not see | |
41 | ; <http://www.gnu.org/licenses/>. | |
42 | ||
43 | Enum | |
f9d29866 JR |
44 | Name(avr_arch) Type(enum avr_arch) |
45 | Known MCU architectures: | |
1b916ca6 JM |
46 | |
47 | EOF | |
48 | ||
49 | awk -F'[(, ]+' 'BEGIN { | |
1b916ca6 | 50 | } |
f9d29866 | 51 | /^AVR_MCU.*NULL/ { |
1b916ca6 | 52 | name = $2 |
f9d29866 | 53 | value = $3 |
1b916ca6 JM |
54 | gsub("\"", "", name) |
55 | print "EnumValue" | |
f9d29866 | 56 | print "Enum(avr_arch) String(" name ") Value(" value ")" |
1b916ca6 | 57 | print "" |
884f56d1 | 58 | }' $1 |