1 # awk script for shlib-versions.v -> soversions.i; see Makeconfig.
4 config = cpu
"-" vendor
"-" os
;
5 configs
[config
] =
"DEFAULT";
10 $
2 ~
/WORDSIZE
[3264]/ {
11 if ((config ~ thiscf
) && !othercf
) {
13 sub(/@CPU@
/, cpu
, othercf
);
14 sub(/@VENDOR@
/, vendor
, othercf
);
15 sub(/@OS@
/, os
, othercf
);
16 configs
[othercf
] = $
2;
21 # Obey the first matching DEFAULT line.
24 default_set
[++ndefault_set
] = thiscf
"\n" $
0;
28 # Collect all lib lines before emitting anything, so DEFAULT
29 # can be interspersed.
33 sub(/^.
*=
/, "", number
);
34 if ((thiscf
FS lib
) in numbers
) next;
35 numbers
[thiscf
FS lib
] = number
;
36 order
[thiscf
FS lib
] =
++order_n
;
39 versions
[thiscf
FS lib
] = $
0
44 for (elt in numbers
) {
53 set =
(c == config
) ? default_setname
: "";
54 for (i =
1; i
<= ndefault_set
; ++i
) {
55 split(default_set
[i
], x
, "\n");
62 line = set ?
(lib
FS numbers
[elt
] FS set
) : (lib
FS numbers
[elt
]);
63 if (!
((c
FS lib
) in lineorder
) || order
[elt
] < lineorder
[c
FS lib
]) {
64 lineorder
[c
FS lib
] = order
[elt
];
65 lines
[c
FS lib
] = configs
[c
] FS line
;